From 673e97e71dde4d111f2c3cd7ea44a43b6ca2d526 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 16 May 2024 10:58:02 -0500 Subject: [PATCH] chore(mobile): upgrade flutter to 3.22 (#9518) * chore(mobile): upgrade flutter sdk * gha * update kotlin * refactor * ios build * remove patch files * not touching openapi pubpsec file --- .github/workflows/build-mobile.yml | 2 +- .github/workflows/static_analysis.yml | 4 +-- .github/workflows/test.yml | 2 +- mobile/.vscode/settings.json | 2 +- mobile/android/build.gradle | 2 ++ mobile/ios/Podfile.lock | 2 +- mobile/lib/utils/immich_app_theme.dart | 8 ++--- .../lib/widgets/common/date_time_picker.dart | 4 +-- .../search/search_filter/camera_picker.dart | 2 +- .../search/search_filter/location_picker.dart | 2 +- .../widgets/settings/language_settings.dart | 4 +-- mobile/pubspec.lock | 34 +++++++++---------- mobile/pubspec.yaml | 2 +- mobile/test/widget_tester_extensions.dart | 4 +-- 14 files changed, 38 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build-mobile.yml b/.github/workflows/build-mobile.yml index e522854059..a362dc3438 100644 --- a/.github/workflows/build-mobile.yml +++ b/.github/workflows/build-mobile.yml @@ -45,7 +45,7 @@ jobs: uses: subosito/flutter-action@v2 with: channel: 'stable' - flutter-version: '3.19.3' + flutter-version: '3.22.0' cache: true - name: Create the Keystore diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml index 1fb9cb55f1..6ebbb46f5e 100644 --- a/.github/workflows/static_analysis.yml +++ b/.github/workflows/static_analysis.yml @@ -22,8 +22,8 @@ jobs: - name: Setup Flutter SDK uses: subosito/flutter-action@v2 with: - channel: "stable" - flutter-version: "3.19.3" + channel: 'stable' + flutter-version: '3.22.0' - name: Install dependencies run: dart pub get diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 184d5a5165..7603c6fb7c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -208,7 +208,7 @@ jobs: uses: subosito/flutter-action@v2 with: channel: 'stable' - flutter-version: '3.19.3' + flutter-version: '3.22.0' - name: Run tests working-directory: ./mobile run: flutter test -j 1 diff --git a/mobile/.vscode/settings.json b/mobile/.vscode/settings.json index 2959ff4e5e..c487d1fe87 100644 --- a/mobile/.vscode/settings.json +++ b/mobile/.vscode/settings.json @@ -1,5 +1,5 @@ { - "dart.flutterSdkPath": ".fvm/versions/3.19.3", + "dart.flutterSdkPath": ".fvm/versions/3.22.0", "search.exclude": { "**/.fvm": true }, diff --git a/mobile/android/build.gradle b/mobile/android/build.gradle index 5e374c9f64..9b757fbc36 100644 --- a/mobile/android/build.gradle +++ b/mobile/android/build.gradle @@ -1,4 +1,6 @@ allprojects { + ext.kotlin_version = '1.9.24' + repositories { google() mavenCentral() diff --git a/mobile/ios/Podfile.lock b/mobile/ios/Podfile.lock index 5493fc2840..bc79594ee9 100644 --- a/mobile/ios/Podfile.lock +++ b/mobile/ios/Podfile.lock @@ -159,7 +159,7 @@ SPEC CHECKSUMS: FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a geolocator_apple: 9157311f654584b9bb72686c55fc02a97b73f461 image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5 - integration_test: 13825b8a9334a850581300559b8839134b124670 + integration_test: ce0a3ffa1de96d1a89ca0ac26fca7ea18a749ef4 isar_flutter_libs: b69f437aeab9c521821c3f376198c4371fa21073 MapLibre: 620fc933c1d6029b33738c905c1490d024e5d4ef maplibre_gl: a2efec727dd340e4c65e26d2b03b584f14881fd9 diff --git a/mobile/lib/utils/immich_app_theme.dart b/mobile/lib/utils/immich_app_theme.dart index 3d550ca17a..32a26439d5 100644 --- a/mobile/lib/utils/immich_app_theme.dart +++ b/mobile/lib/utils/immich_app_theme.dart @@ -121,12 +121,12 @@ final ThemeData immichLightTheme = ThemeData( ), navigationBarTheme: NavigationBarThemeData( indicatorColor: Colors.indigo.withOpacity(0.15), - iconTheme: MaterialStatePropertyAll( + iconTheme: WidgetStatePropertyAll( IconThemeData(color: Colors.grey[700]), ), backgroundColor: immichBackgroundColor, surfaceTintColor: Colors.transparent, - labelTextStyle: MaterialStatePropertyAll( + labelTextStyle: WidgetStatePropertyAll( TextStyle( fontSize: 13, fontWeight: FontWeight.w500, @@ -249,12 +249,12 @@ final ThemeData immichDarkTheme = ThemeData( ), navigationBarTheme: NavigationBarThemeData( indicatorColor: immichDarkThemePrimaryColor.withOpacity(0.4), - iconTheme: MaterialStatePropertyAll( + iconTheme: WidgetStatePropertyAll( IconThemeData(color: Colors.grey[500]), ), backgroundColor: Colors.grey[900], surfaceTintColor: Colors.transparent, - labelTextStyle: MaterialStatePropertyAll( + labelTextStyle: WidgetStatePropertyAll( TextStyle( fontSize: 13, fontWeight: FontWeight.w500, diff --git a/mobile/lib/widgets/common/date_time_picker.dart b/mobile/lib/widgets/common/date_time_picker.dart index adc2092f87..746917d3fb 100644 --- a/mobile/lib/widgets/common/date_time_picker.dart +++ b/mobile/lib/widgets/common/date_time_picker.dart @@ -164,7 +164,7 @@ class _DateTimePicker extends HookWidget { color: context.primaryColor, ), menuStyle: const MenuStyle( - fixedSize: MaterialStatePropertyAll(Size.fromWidth(350)), + fixedSize: WidgetStatePropertyAll(Size.fromWidth(350)), alignment: Alignment(-1.25, 0.5), ), onSelected: (value) => tzOffset.value = value!, @@ -175,7 +175,7 @@ class _DateTimePicker extends HookWidget { value: t, label: t.display, style: ButtonStyle( - textStyle: MaterialStatePropertyAll( + textStyle: WidgetStatePropertyAll( context.textTheme.bodyMedium, ), ), diff --git a/mobile/lib/widgets/search/search_filter/camera_picker.dart b/mobile/lib/widgets/search/search_filter/camera_picker.dart index fc7f1090d7..ea347141a7 100644 --- a/mobile/lib/widgets/search/search_filter/camera_picker.dart +++ b/mobile/lib/widgets/search/search_filter/camera_picker.dart @@ -40,7 +40,7 @@ class CameraPicker extends HookConsumerWidget { ); final menuStyle = MenuStyle( - shape: MaterialStatePropertyAll( + shape: WidgetStatePropertyAll( RoundedRectangleBorder( borderRadius: BorderRadius.circular(15), ), diff --git a/mobile/lib/widgets/search/search_filter/location_picker.dart b/mobile/lib/widgets/search/search_filter/location_picker.dart index 05b55a7403..3aee57c3ca 100644 --- a/mobile/lib/widgets/search/search_filter/location_picker.dart +++ b/mobile/lib/widgets/search/search_filter/location_picker.dart @@ -56,7 +56,7 @@ class LocationPicker extends HookConsumerWidget { ); final menuStyle = MenuStyle( - shape: MaterialStatePropertyAll( + shape: WidgetStatePropertyAll( RoundedRectangleBorder( borderRadius: BorderRadius.circular(15), ), diff --git a/mobile/lib/widgets/settings/language_settings.dart b/mobile/lib/widgets/settings/language_settings.dart index 4569888541..378d32085e 100644 --- a/mobile/lib/widgets/settings/language_settings.dart +++ b/mobile/lib/widgets/settings/language_settings.dart @@ -34,12 +34,12 @@ class LanguageSettings extends HookConsumerWidget { contentPadding: const EdgeInsets.only(left: 16), ), menuStyle: MenuStyle( - shape: MaterialStatePropertyAll( + shape: WidgetStatePropertyAll( RoundedRectangleBorder( borderRadius: BorderRadius.circular(15), ), ), - backgroundColor: MaterialStatePropertyAll( + backgroundColor: WidgetStatePropertyAll( context.isDarkTheme ? Colors.grey[900]! : context.scaffoldBackgroundColor, diff --git a/mobile/pubspec.lock b/mobile/pubspec.lock index 280d1d8e11..b1c1db2e1e 100644 --- a/mobile/pubspec.lock +++ b/mobile/pubspec.lock @@ -381,10 +381,10 @@ packages: dependency: "direct main" description: name: easy_localization - sha256: de63e3b422adfc97f256cbb3f8cf12739b6a4993d390f3cadb3f51837afaefe5 + sha256: fa59bcdbbb911a764aa6acf96bbb6fa7a5cf8234354fc45ec1a43a0349ef0201 url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.7" easy_logger: dependency: transitive description: @@ -699,10 +699,10 @@ packages: dependency: transitive description: name: hotreloader - sha256: "94ee21a60ea2836500799f3af035dc3212b1562027f1e0031c14e087f0231449" + sha256: ed56fdc1f3a8ac924e717257621d09e9ec20e308ab6352a73a50a1d7a4d9158e url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.2.0" html: dependency: transitive description: @@ -816,10 +816,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -872,26 +872,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -1503,10 +1503,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" thumbhash: dependency: "direct main" description: @@ -1703,10 +1703,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" wakelock_plus: dependency: "direct main" description: @@ -1805,4 +1805,4 @@ packages: version: "3.1.2" sdks: dart: ">=3.3.0 <4.0.0" - flutter: ">=3.16.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index 8ee159651c..ed6afd7ff7 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -21,7 +21,7 @@ dependencies: riverpod_annotation: ^2.3.3 cached_network_image: ^3.3.1 flutter_cache_manager: ^3.3.1 - intl: ^0.18.0 + intl: ^0.19.0 auto_route: ^8.0.2 fluttertoast: ^8.2.4 video_player: ^2.8.2 diff --git a/mobile/test/widget_tester_extensions.dart b/mobile/test/widget_tester_extensions.dart index c054a32501..7d5b266224 100644 --- a/mobile/test/widget_tester_extensions.dart +++ b/mobile/test/widget_tester_extensions.dart @@ -23,8 +23,8 @@ extension PumpConsumerWidget on WidgetTester { home: Material(child: widget), ), ), - duration, - phase, + duration: duration, + phase: phase, ); } }