Repository navigation
[591] Update Flutter, Dart, Android and the dependencies - #592
Merged
Merged
Conversation
Flutter 3.47.9 (Dart 3.13.7) and the latest versions of the pub dependencies, with the code changes they need. The Android build fails with a recent JDK, and this is the first step of its fix: the Gradle and Android Gradle Plugin updates come in their own commit. Five packages are kept on their previous versions, because their latest versions depend on material_ui, the Material library that Flutter 3.47 moved out of the framework. Their types no longer match the ones of package:flutter/material.dart that the app imports: - dynamic_color 1.9.0 (2.x needs material_ui) - fleather >=1.27.0 <1.28.0 - flutter_expandable_fab 2.5.2 (3.x needs material_ui) - flutter_riverpod >=3.4.3 <3.5.0 (3.5.x needs material_ui) - go_router 17.5.0 (18.x needs material_ui) Migrating the app to material_ui is a separate change. The major updates are: equatable 3, dart_helper_utils 7, saf_stream 4, saf_util 3, flutter_secure_storage 11, go_router 18 (kept at 17, see above). riverpod_lint is run as an analyzer plugin, in place of the legacy custom_lint. Refs #591 Co-Authored-By: Claude <noreply@anthropic.com>
Formatting only, no change of behavior. The files were formatted by the previous formatter. Refs #591 Co-Authored-By: Claude <noreply@anthropic.com>
The new analyzer reports a Future returned without await inside a try block: an error in setAutoExportDirectoryToDefault would be caught by the wrong handler. It is now awaited, then the method returns. Refs #591 Co-Authored-By: Claude <noreply@anthropic.com>
riverpod_lint is an analyzer plugin now, so its rules are ignored by their plugin name, riverpod_lint/avoid_ref_inside_state_dispose. Refs #591 Co-Authored-By: Claude <noreply@anthropic.com>
Gradle 8.13 does not run on Java 25 (the JDK of recent Android Studio versions): the build fails with "Unsupported class file major version 69". Gradle 9.3.1 runs on it, and it is the version the Flutter 3.47 templates use with Android Gradle Plugin 9.1.0 and Kotlin 2.4.0. The distributionSha256Sum line is removed: the checksum could not be fetched in the environment of this change. Gradle regenerates it with `gradle wrapper --gradle-version 9.3.1`. The NDK (27.3, also in .ndk-version for the Isar build) and the Java 17 target are unchanged. Refs #591 Co-Authored-By: Claude <noreply@anthropic.com>
Owner
Author
|
Cradle checksums: 9.3.1 |
The checksum of gradle-9.3.1-all.zip was removed because it could not be fetched here. It is the one published by Gradle, and the wrapper checks the download against it again. Refs #591 Co-Authored-By: Claude <noreply@anthropic.com>
…itor The expandable FAB wraps its buttons in a FocusScope while it is not fully closed, and removes it when its 250 ms closing animation ends. Closing the FAB and pushing the editor in the same frame (#583) made the editor take the focus first, then lose it, and the keyboard closed, when the animation ended. closeAddNoteFabIfOpen() now returns whether the FAB started to close, and the FAB waits for its closing animation (with a timeout, in case it cannot complete) before adding the note. Refs #593 Co-Authored-By: Claude <noreply@anthropic.com>
The previous commit waited for the FAB to finish closing before opening the editor, which delayed the editor by the length of the animation. The real cause is the `autofocus: true` of the buttons that open and close the expandable FAB (`RotateFloatingActionButtonBuilder` of flutter_expandable_fab). When the closing animation ends, the FAB removes its FocusScope and builds its buttons again, and the autofocus makes its button take the focus, which removes it from the editor and closes the keyboard. The FAB now uses its own toggle button, identical but without autofocus, and the editor opens immediately again. Refs #593 Co-Authored-By: Claude <noreply@anthropic.com>
Use the size constraints of the floating action button theme when it sets them, and the regular size of the package otherwise, instead of a hardcoded 56. Refs #593 Co-Authored-By: Claude <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #591 and #593.
Changes
Flutter 3.47.9 (Dart 3.13.7),
.fvmrcandpubspec.yaml.Dependencies: the latest versions, with the code changes they need (
chore(deps)). Equatable 3, dart_helper_utils 7, saf_stream 4, saf_util 3, flutter_secure_storage 11, among others.Five packages kept on their previous versions (
chore(deps)). Their latest versions depend onmaterial_ui, the Material library that Flutter 3.47 moved out of the framework. Their types no longer matchpackage:flutter/material.dart, which the app imports:>=1.27.0 <1.28.0;>=3.4.3 <3.5.0;Migrating the app to
material_uiis a separate change: it touches every file that imports Material, and settings_tiles and flutter_checklist too.Gradle 9.3.1, Android Gradle Plugin 9.1.0, Kotlin 2.4.0 (
build(android)). Gradle 8.13 fails on Java 25 (Unsupported class file major version 69). The versions are the ones of the Flutter 3.47 templates. ThedistributionSha256Sumof the Gradle distribution is set.Unchanged on purpose: the NDK 27.3 (also in
.ndk-versionfor the Isar build), and the Java 17 target, which the CI and the Flutter templates still use.Lint:
riverpod_lintruns as an analyzer plugin, in place of the legacycustom_lint; its rules are ignored by their plugin name.auto_backup_service.dartawaits a future returned in atryblock, as the new analyzer requires.Formatting: 12 files reformatted by the Dart 3.13 formatter (
style), no behavior change.Editor focus (The editor loses the focus when a note is created from the expandable FAB #593,
fix(editor)): with several note types, the editor lost the focus (and the keyboard closed) when the expandable FAB finished closing, 250 ms after a note was created from it. The buttons that open and close the FAB (RotateFloatingActionButtonBuilderof flutter_expandable_fab) are built withautofocus: true: when the closing animation ends, the FAB builds them again and the button takes the focus. The FAB now uses its own toggle button, identical but without autofocus (AddNoteFab.buildToggleButton). The editor still opens immediately. Found while testing this update by hand.Checks
dart run build_runner build,flutter gen-l10n,dart format -l 120,dart analyze --fatal-infos(Flutter 3.47.9): no issues.1995209: Format, Lint, Native libraries and Android all pass. The Android job builds the release APK, so the new Gradle and AGP versions sync and build. The focus fix was added after that run.To try by hand