Skip to content

Upgrade Flutter and packages#2303

Merged
chrisbobbe merged 8 commits into
zulip:mainfrom
rajveermalviya:pr-flutter-upgrade
Jun 2, 2026
Merged

Upgrade Flutter and packages#2303
chrisbobbe merged 8 commits into
zulip:mainfrom
rajveermalviya:pr-flutter-upgrade

Conversation

@rajveermalviya
Copy link
Copy Markdown
Member

@rajveermalviya rajveermalviya commented Apr 28, 2026

Fixes #2295.

Flutter notable commits

Because this upgrade includes some (major) changes with how native libraries are built and bundled, I verified that the iOS App Store validation is passing. By following the steps at: #mobile-team > iOS upload error: LC_ENCRYPTION_INFO @ 💬

@rajveermalviya rajveermalviya marked this pull request as draft April 28, 2026 19:56
@rajveermalviya rajveermalviya marked this pull request as ready for review April 28, 2026 20:11
@rajveermalviya rajveermalviya added the maintainer review PR ready for review by Zulip maintainers label Apr 29, 2026
Copy link
Copy Markdown
Collaborator

@chrisbobbe chrisbobbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for doing this! One nit below.

I checked that the app builds and runs on iOS, after a few routine commands (pod repo update and flutter clean, I think, and both times I was prompted to run the command in some error output).

Have you checked that the app builds and runs on Android?

Comment thread pubspec.yaml
@@ -59,8 +59,7 @@ dependencies:
share_plus: ^12.0.0
share_plus_platform_interface: ^6.0.0
sodium_libs: ^3.4.6+4
sqlite3: ^2.4.0
sqlite3_flutter_libs: 0.5.41
sqlite3: ^3.3.1
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most notable change is that package:sqlite3 now uses
Dart build hooks for building sqlite3 libraries and now
discontinues the sqlite3_flutter_libs package.
And package:drift includes changes to use that new sqlite3 package.

Cool, seems like a nice cleanup.

Comment thread pubspec.yaml
@@ -58,7 +58,7 @@ dependencies:
path_provider_foundation: ^2.6.0
share_plus: ^12.0.0
share_plus_platform_interface: ^6.0.0
sodium_libs: ^3.4.6+4
sodium: ^4.0.2+1
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package:sodium_libs is now discontinued and prefers the use of
package:sodium directly. This is because package:sodium now uses
Dart build hooks to build the libsodium native library.

Interesting; similar story here, it sounds like.

Comment thread pubspec.yaml
@@ -42,7 +42,7 @@ dependencies:
csslib: ^1.0.2
device_info_plus: ^12.0.0
drift: ^2.23.0
file_picker: ^10.1.2
file_picker: ^11.0.2
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deps: Upgrade pigeon to 11.0.2, from 10.3.10

commit-message nit: looks like file_picker, not pigeon

@rajveermalviya
Copy link
Copy Markdown
Member Author

Thanks for the review @chrisbobbe! Pushed an update, PTAL.

Have you checked that the app builds and runs on Android?

Yes, it builds and runs fine. Also tested the E2EE notifications are working correctly (because of the package:sodium upgrade).

Copy link
Copy Markdown
Collaborator

@chrisbobbe chrisbobbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Two small comments from having Claude read this. Also, would you add a commit to bump Flutter again, for #2295 (comment) ?

@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.2.0), do not edit directly.
// Autogenerated from Pigeon (v26.3.4), do not edit directly.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deps: Upgrade pigeon to 26.3.2, from 26.2.0

Ah looks like this needs fixing up (26.3.2 vs. 26.3.4).

Comment thread android/gradle.properties
Comment on lines +4 to +5
android.builtInKotlin=false
android.newDsl=false
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the intended end state of the migration is that "new DSL" will be supported; is that right? I'm looking at flutter/flutter#180137 , linked from the commit you referred to.

If we want to eventually change one or both of these lines, let's add a TODO for it.

@rajveermalviya rajveermalviya force-pushed the pr-flutter-upgrade branch 2 times, most recently from 08a0714 to e75764f Compare May 1, 2026 18:11
@rajveermalviya
Copy link
Copy Markdown
Member Author

rajveermalviya commented May 1, 2026

Thanks for the review @chrisbobbe! Pushed an update, PTAL.

Also verified that #2295 is no longer reproducible with the latest Flutter version, where with the older Flutter version I did reproduce it.

@rajveermalviya rajveermalviya requested a review from chrisbobbe May 1, 2026 18:12
@rajveermalviya rajveermalviya force-pushed the pr-flutter-upgrade branch 2 times, most recently from 541ee41 to 934c1a1 Compare May 11, 2026 09:50
Copy link
Copy Markdown
Collaborator

@chrisbobbe chrisbobbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just one nit below.

Comment thread lib/model/binding.dart
@@ -7,7 +7,7 @@ import 'package:firebase_messaging/firebase_messaging.dart' as firebase_messagin
import 'package:flutter/foundation.dart';
import 'package:image_picker/image_picker.dart' as image_picker;
import 'package:package_info_plus/package_info_plus.dart' as package_info_plus;
import 'package:sodium_libs/sodium_libs.dart';
import 'package:sodium/sodium.dart';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there's a dangling reference to package:sodium_libs that needs updating

@rajveermalviya rajveermalviya force-pushed the pr-flutter-upgrade branch 2 times, most recently from 5038889 to 21c75aa Compare May 14, 2026 11:41
@rajveermalviya
Copy link
Copy Markdown
Member Author

Thanks! Pushed an update, PTAL.

@rajveermalviya rajveermalviya requested a review from chrisbobbe May 14, 2026 11:42
@rajveermalviya rajveermalviya added integration review Added by maintainers when PR may be ready for integration and removed maintainer review PR ready for review by Zulip maintainers labels Jun 1, 2026
And update Flutter's supporting libraries to match.

And also pull in automatic migration for opting-out of
`android.builtInKotlin` and `android.newDsl` in `gradle.properties`
when building and running the app on Android. These migrations were
introduced in the following upstream commit:
  flutter/flutter@437f828fa
This commit is the result of the following commands:
  flutter pub upgrade --major-versions firebase_messaging firebase_core
  pod update --project-directory=ios/
  pod update --project-directory=macos/

Changelogs:
  https://pub.dev/packages/firebase_core/changelog#470
  https://pub.dev/packages/firebase_messaging/changelog#1620

package:firebase_core now supports Flutter's iOS UIScene migration,
and package:firebase_messaging fixes a related bug where
initialization might happen twice with UIScene, leading to a crash.
We are not using UIScene yet so we were not affected.

Other notable changes include bump to Firebase Android BoM
(34.9.0 to 34.12.0) and Firebase iOS SDK (12.9.0 to 12.12.0),
changelog for those are at:
  https://firebase.google.com/support/release-notes/android
  https://firebase.google.com/support/release-notes/ios

For Android SDK, no notable changes in the FCM component.

For iOS SDK, no notable changes in the FCM component.
This commit is the result of the following commands:
  flutter pub upgrade --major-versions drift drift_dev sqlite3 sqlite3_flutter_libs
  flutter pub remove sqlite3_flutter_libs
  pod update --project-directory=ios/
  pod update --project-directory=macos/

Changelogs:
  https://pub.dev/packages/drift/changelog#2321
  https://pub.dev/packages/drift_dev/changelog#2321
  https://pub.dev/packages/sqlite3/changelog#331

Most notable change is that package:sqlite3 now uses
Dart build hooks for building sqlite3 libraries and now
discontinues the sqlite3_flutter_libs package.
And package:drift includes changes to use that new sqlite3 package.
This commit is the result of the following commands:
  flutter pub upgrade --major-versions pigeon
  tools/check --all-files --fix pigeon

Changelog:
  https://pub.dev/packages/pigeon/changelog#2634
This commit is the result of the following commands:
  flutter pub remove sodium_libs
  flutter pub add sodium
  pod update --project-directory=ios/
  pod update --project-directory=macos/

Changelogs:
  https://pub.dev/packages/sodium/changelog#4021---2026-04-14

package:sodium_libs is now discontinued and prefers the use of
package:sodium directly. This is because package:sodium now uses
Dart build hooks to build the libsodium native library.
This commit is the result of the following commands:
  flutter pub upgrade --major-versions file_picker

Changelog:
  https://pub.dev/packages/file_picker/changelog#1102

There is a breaking change where the pickFiles method is a static
method on FilePicker class instead of an instance. So, update our
code to accommodate for that.

Additionally, there seems to be a security bug fix for Android:
  miguelpruivo/flutter_file_picker#1967
And update Flutter's supporting libraries to match.

This upgrade also includes an upstream fix for zulip#2295:
  flutter/flutter#185292
  flutter/flutter#184744

Fixes: zulip#2295
@chrisbobbe chrisbobbe force-pushed the pr-flutter-upgrade branch from 21c75aa to 87fd65b Compare June 2, 2026 03:37
@chrisbobbe chrisbobbe merged commit 87fd65b into zulip:main Jun 2, 2026
2 checks passed
@chrisbobbe
Copy link
Copy Markdown
Collaborator

Thanks! Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration review Added by maintainers when PR may be ready for integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Message editing is always in select mode

2 participants