Skip to content

[591] Update Flutter, Dart, Android and the dependencies - #592

Merged
maelchiotti merged 9 commits into
v2.3.0from
fix/591_update_dependencies
Nov 13, 2026
Merged

maelchiotti merged 9 commits into
v2.3.0from
fix/591_update_dependencies

Conversation

@maelchiotti

@maelchiotti maelchiotti commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Closes #591 and #593.

Changes

  • Flutter 3.47.9 (Dart 3.13.7), .fvmrc and pubspec.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 on material_ui, the Material library that Flutter 3.47 moved out of the framework. Their types no longer match package:flutter/material.dart, which the app imports:

    • dynamic_color 1.9.0;
    • fleather >=1.27.0 <1.28.0;
    • flutter_expandable_fab 2.5.2;
    • flutter_riverpod >=3.4.3 <3.5.0;
    • go_router 17.5.0.

    Migrating the app to material_ui is 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. The distributionSha256Sum of the Gradle distribution is set.

  • Unchanged on purpose: the NDK 27.3 (also in .ndk-version for the Isar build), and the Java 17 target, which the CI and the Flutter templates still use.

  • Lint: riverpod_lint runs as an analyzer plugin, in place of the legacy custom_lint; its rules are ignored by their plugin name. auto_backup_service.dart awaits a future returned in a try block, 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 (RotateFloatingActionButtonBuilder of flutter_expandable_fab) are built with autofocus: 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.
  • The focus fix is checked with a widget test outside the repository (which has no tests): with the package's buttons the editor loses the focus at 250 ms, with the button without autofocus it keeps it.
  • CI on 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

  • Install the release APK from the CI artifact and check the main flows, since the update changes the whole stack (Dart 3.13, the new plugins, Material layout).
  • With at least two note types enabled, create a note of each type from the expandable FAB (notes page and label page) and check that the keyboard stays open and that the editor opens without delay. The open and close button of the FAB should look and rotate as before.

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>
@maelchiotti maelchiotti added the bug Something isn't working label Nov 11, 2026 — with Claude
@maelchiotti maelchiotti self-assigned this Nov 11, 2026
@maelchiotti maelchiotti moved this to In progress in LocalMaterialNotes Nov 11, 2026
@maelchiotti
maelchiotti marked this pull request as ready for review November 11, 2026 11:02
@maelchiotti

Copy link
Copy Markdown
Owner Author

Cradle checksums:

9.3.1

Binary-only (-bin) ZIP Checksum: b266d5ff6b90eada6dc3b20cb090e3731302e553a27c5d3e4df1f0d76beaff06
Complete (-all) ZIP Checksum: 17f277867f6914d61b1aa02efab1ba7bb439ad652ca485cd8ca6842fccec6e43
Wrapper JAR Checksum: b3a875ddc1f044746e1b1a55f645584505f4a10438c1afea9f15e92a7c42ec13

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>
@maelchiotti maelchiotti linked an issue Nov 13, 2026 that may be closed by this pull request
@maelchiotti
maelchiotti merged commit 8de3396 into v2.3.0 Nov 13, 2026
5 checks passed
@maelchiotti
maelchiotti deleted the fix/591_update_dependencies branch November 13, 2026 10:19
@github-project-automation github-project-automation Bot moved this from In progress to Done in LocalMaterialNotes Nov 13, 2026

This branch was successfully deployed

1 active deployment
build — a366917e Deployed Nov 13, 2026 by maelchiotti via Android #821
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Development

Successfully merging this pull request may close these issues.

Note focus lost on opening when multiple notes types are available

2 participants