1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-28 09:33:27 +02:00

chore(mobile): Flutter 3.24 (#11633)

* chore(mobile): Flutter 3.24

* fix lint

* fix rendering issues that lead to log get filled with error messages

* linting

* merge main

* fix isar prod build Android

* fix mismatch icon offset
This commit is contained in:
Alex 2024-08-15 14:53:37 -05:00 committed by GitHub
parent 00023e387f
commit ed6971222c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 86 additions and 66 deletions

View File

@ -1,3 +1,3 @@
{
"flutter": "3.22.3"
"flutter": "3.24.0"
}

View File

@ -1,5 +1,5 @@
{
"dart.flutterSdkPath": ".fvm/versions/3.22.3",
"dart.flutterSdkPath": ".fvm/versions/3.24.0",
"search.exclude": {
"**/.fvm": true
},

View File

@ -10,6 +10,18 @@ allprojects {
rootProject.buildDir = '../build'
subprojects {
// fix for verifyReleaseResources
// ============
afterEvaluate { project ->
if (project.plugins.hasPlugin("com.android.application") ||
project.plugins.hasPlugin("com.android.library")) {
project.android {
compileSdkVersion 34
buildToolsVersion "34.0.0"
}
}
}
// ============
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
@ -24,3 +36,4 @@ tasks.register("clean", Delete) {
tasks.named('wrapper') {
distributionType = Wrapper.DistributionType.ALL
}

View File

@ -202,7 +202,7 @@ SPEC CHECKSUMS:
fluttertoast: e9a18c7be5413da53898f660530c56f35edfba9c
geolocator_apple: 6cbaf322953988e009e5ecb481f07efece75c450
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
integration_test: ce0a3ffa1de96d1a89ca0ac26fca7ea18a749ef4
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
isar_flutter_libs: b69f437aeab9c521821c3f376198c4371fa21073
MapLibre: 620fc933c1d6029b33738c905c1490d024e5d4ef
maplibre_gl: a2efec727dd340e4c65e26d2b03b584f14881fd9

View File

@ -6,7 +6,7 @@ import path_provider_ios
import photo_manager
import permission_handler_apple
@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(

View File

@ -39,7 +39,6 @@ import 'package:path_provider/path_provider.dart';
void main() async {
ImmichWidgetsBinding();
final db = await loadDb();
await initApp();
await migrateDatabaseIfNeeded(db);
@ -73,6 +72,7 @@ Future<void> initApp() async {
var log = Logger("ImmichErrorLogger");
FlutterError.onError = (details) {
debugPrint("FlutterError - Catch all: $details");
FlutterError.presentError(details);
log.severe(
'FlutterError - Catch all',

View File

@ -264,7 +264,7 @@ class GalleryViewerPage extends HookConsumerWidget {
return PopScope(
// Change immersive mode back to normal "edgeToEdge" mode
onPopInvoked: (_) =>
onPopInvokedWithResult: (didPop, _) =>
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge),
child: Scaffold(
backgroundColor: Colors.black,

View File

@ -74,7 +74,7 @@ class HeaderSettingsPage extends HookConsumerWidget {
],
),
body: PopScope(
onPopInvoked: (_) => saveHeaders(headers.value),
onPopInvokedWithResult: (didPop, _) => saveHeaders(headers.value),
child: ListView.separated(
padding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 16.0),
itemCount: list.length,

View File

@ -177,7 +177,7 @@ class TabControllerPage extends HookConsumerWidget {
final tabsRouter = AutoTabsRouter.of(context);
return PopScope(
canPop: tabsRouter.activeIndex == 0,
onPopInvoked: (didPop) =>
onPopInvokedWithResult: (didPop, _) =>
!didPop ? tabsRouter.setActiveIndex(0) : null,
child: LayoutBuilder(
builder: (context, constraints) {

View File

@ -123,7 +123,7 @@ class VideoViewerPage extends HookConsumerWidget {
final size = MediaQuery.sizeOf(context);
return PopScope(
onPopInvoked: (pop) {
onPopInvokedWithResult: (didPop, _) {
ref.read(videoPlaybackValueProvider.notifier).value =
VideoPlaybackValue.uninitialized();
},

View File

@ -59,6 +59,8 @@ class DraggableScrollbar extends StatefulWidget {
final Function(bool scrolling) scrollStateListener;
final double viewPortHeight;
DraggableScrollbar.semicircle({
super.key,
Key? scrollThumbKey,
@ -67,6 +69,7 @@ class DraggableScrollbar extends StatefulWidget {
required this.controller,
required this.itemPositionsListener,
required this.scrollStateListener,
required this.viewPortHeight,
this.heightScrollThumb = 48.0,
this.backgroundColor = Colors.white,
this.padding,
@ -251,7 +254,7 @@ class DraggableScrollbarState extends State<DraggableScrollbar>
}
double get barMaxScrollExtent =>
(context.size?.height ?? 0) -
widget.viewPortHeight -
widget.heightScrollThumb -
(widget.heightOffset ?? 0);
@ -316,37 +319,39 @@ class DraggableScrollbarState extends State<DraggableScrollbar>
}
setState(() {
int firstItemIndex =
widget.itemPositionsListener.itemPositions.value.first.index;
try {
int firstItemIndex =
widget.itemPositionsListener.itemPositions.value.first.index;
if (notification is ScrollUpdateNotification) {
_barOffset = (firstItemIndex / maxItemCount) * barMaxScrollExtent;
if (notification is ScrollUpdateNotification) {
_barOffset = (firstItemIndex / maxItemCount) * barMaxScrollExtent;
if (_barOffset < barMinScrollExtent) {
_barOffset = barMinScrollExtent;
}
if (_barOffset > barMaxScrollExtent) {
_barOffset = barMaxScrollExtent;
}
}
if (notification is ScrollUpdateNotification ||
notification is OverscrollNotification) {
if (_thumbAnimationController.status != AnimationStatus.forward) {
_thumbAnimationController.forward();
if (_barOffset < barMinScrollExtent) {
_barOffset = barMinScrollExtent;
}
if (_barOffset > barMaxScrollExtent) {
_barOffset = barMaxScrollExtent;
}
}
if (itemPos < maxItemCount) {
_currentItem = itemPos;
}
if (notification is ScrollUpdateNotification ||
notification is OverscrollNotification) {
if (_thumbAnimationController.status != AnimationStatus.forward) {
_thumbAnimationController.forward();
}
_fadeoutTimer?.cancel();
_fadeoutTimer = Timer(widget.scrollbarTimeToFade, () {
_thumbAnimationController.reverse();
_labelAnimationController.reverse();
_fadeoutTimer = null;
});
}
if (itemPos < maxItemCount) {
_currentItem = itemPos;
}
_fadeoutTimer?.cancel();
_fadeoutTimer = Timer(widget.scrollbarTimeToFade, () {
_thumbAnimationController.reverse();
_labelAnimationController.reverse();
_fadeoutTimer = null;
});
}
} catch (_) {}
});
}

View File

@ -262,8 +262,9 @@ class ImmichAssetGridViewState extends ConsumerState<ImmichAssetGridView> {
shrinkWrap: widget.shrinkWrap,
);
final child = useDragScrolling
final child = (useDragScrolling && ModalRoute.of(context) != null)
? DraggableScrollbar.semicircle(
viewPortHeight: context.height,
scrollStateListener: dragScrolling,
itemPositionsListener: _itemPositionsListener,
controller: _itemScrollController,
@ -281,6 +282,7 @@ class ImmichAssetGridViewState extends ConsumerState<ImmichAssetGridView> {
child: listWidget,
)
: listWidget;
return widget.onRefresh == null
? child
: appBarOffset()
@ -528,7 +530,7 @@ class ImmichAssetGridViewState extends ConsumerState<ImmichAssetGridView> {
Widget build(BuildContext context) {
return PopScope(
canPop: !(widget.selectionActive && _selectedAssets.isNotEmpty),
onPopInvoked: (didPop) => !didPop ? _deselectAll() : null,
onPopInvokedWithResult: (didPop, _) => !didPop ? _deselectAll() : null,
child: Stack(
children: [
AssetDragRegion(

View File

@ -58,7 +58,7 @@ class ImmichAppBar extends ConsumerWidget implements PreferredSizeWidget {
isLabelVisible: serverInfoState.isVersionMismatch ||
((user?.isAdmin ?? false) &&
serverInfoState.isNewReleaseAvailable),
offset: const Offset(2, 2),
offset: const Offset(-2, -12),
child: user == null
? const Icon(
Icons.face_outlined,
@ -132,7 +132,7 @@ class ImmichAppBar extends ConsumerWidget implements PreferredSizeWidget {
backgroundColor: Colors.transparent,
alignment: Alignment.bottomRight,
isLabelVisible: indicatorIcon != null,
offset: const Offset(2, 2),
offset: const Offset(-2, -12),
child: Icon(
Icons.backup_rounded,
size: widgetSize,

View File

@ -5,23 +5,23 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: "5aaf60d96c4cd00fe7f21594b5ad6a1b699c80a27420f8a837f4d68473ef09e3"
sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834
url: "https://pub.dev"
source: hosted
version: "68.0.0"
version: "72.0.0"
_macros:
dependency: transitive
description: dart
source: sdk
version: "0.1.0"
version: "0.3.2"
analyzer:
dependency: "direct overridden"
description:
name: analyzer
sha256: "21f1d3720fd1c70316399d5e2bccaebb415c434592d778cce8acb967b8578808"
sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139
url: "https://pub.dev"
source: hosted
version: "6.5.0"
version: "6.7.0"
analyzer_plugin:
dependency: "direct overridden"
description:
@ -540,10 +540,10 @@ packages:
dependency: "direct main"
description:
name: flutter_local_notifications
sha256: "55b9b229307a10974b26296ff29f2e132256ba4bd74266939118eaefa941cb00"
sha256: dd6676d8c2926537eccdf9f72128bbb2a9d0814689527b17f92c248ff192eaf3
url: "https://pub.dev"
source: hosted
version: "16.3.3"
version: "17.2.1+2"
flutter_local_notifications_linux:
dependency: transitive
description:
@ -901,18 +901,18 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
url: "https://pub.dev"
source: hosted
version: "10.0.4"
version: "10.0.5"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
url: "https://pub.dev"
source: hosted
version: "3.0.3"
version: "3.0.5"
leak_tracker_testing:
dependency: transitive
description:
@ -941,10 +941,10 @@ packages:
dependency: transitive
description:
name: macros
sha256: "12e8a9842b5a7390de7a781ec63d793527582398d16ea26c60fed58833c9ae79"
sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
url: "https://pub.dev"
source: hosted
version: "0.1.0-main.0"
version: "0.1.2-main.4"
maplibre_gl:
dependency: "direct main"
description:
@ -981,10 +981,10 @@ packages:
dependency: transitive
description:
name: material_color_utilities
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.8.0"
version: "0.11.1"
meta:
dependency: "direct overridden"
description:
@ -1212,10 +1212,10 @@ packages:
dependency: transitive
description:
name: platform
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65"
url: "https://pub.dev"
source: hosted
version: "3.1.4"
version: "3.1.5"
plugin_platform_interface:
dependency: transitive
description:
@ -1537,10 +1537,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
url: "https://pub.dev"
source: hosted
version: "0.7.0"
version: "0.7.2"
thumbhash:
dependency: "direct main"
description:
@ -1737,10 +1737,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
url: "https://pub.dev"
source: hosted
version: "14.2.1"
version: "14.2.4"
wakelock_plus:
dependency: "direct main"
description:
@ -1847,4 +1847,4 @@ packages:
version: "3.1.2"
sdks:
dart: ">=3.4.0 <4.0.0"
flutter: ">=3.22.3"
flutter: ">=3.24.0"

View File

@ -6,7 +6,7 @@ version: 1.112.1+154
environment:
sdk: '>=3.3.0 <4.0.0'
flutter: 3.22.3
flutter: 3.24.0
dependencies:
flutter:
@ -50,7 +50,7 @@ dependencies:
device_info_plus: ^9.1.1
connectivity_plus: ^5.0.2
wakelock_plus: ^1.1.4
flutter_local_notifications: ^16.3.2
flutter_local_notifications: ^17.2.1+2
timezone: ^0.9.2
octo_image: ^2.0.0
thumbhash: 0.1.0+1