Skip to content
This repository was archived by the owner on Apr 3, 2025. It is now read-only.

Commit f1b831a

Browse files
committed
feat(flutter): upgrade to Flutter 3.7/b06b8b2710
1 parent 0b59b72 commit f1b831a

File tree

11 files changed

+547
-352
lines changed

11 files changed

+547
-352
lines changed

ios/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
platform :ios, '11.0'
2-
$FirebaseSDKVersion = '10.2.0'
2+
$FirebaseSDKVersion = '10.3.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

lib/modules.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ extension LunaModuleRoutingExtension on LunaModule {
413413

414414
Future<void> launch() async {
415415
if (homeRoute != null) {
416-
LunaRouter.router.replace(homeRoute!);
416+
LunaRouter.router.pushReplacement(homeRoute!);
417417
}
418418
}
419419
}

lib/modules/radarr/core/api_helper.dart

+4-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class RadarrAPIHelper {
9292
bool showSnackbar = true,
9393
}) async {
9494
if (context.read<RadarrState>().enabled) {
95-
return await context
95+
final result = await context
9696
.read<RadarrState>()
9797
.api!
9898
.movie
@@ -120,7 +120,10 @@ class RadarrAPIHelper {
120120
'Failed to add movie (tmdbId: ${movie.tmdbId})', error, stack);
121121
if (showSnackbar)
122122
showLunaErrorSnackBar(title: 'Failed to Add Movie', error: error);
123+
return RadarrMovie();
123124
});
125+
if (result.id == null) return null;
126+
return result;
124127
}
125128
return null;
126129
}

lib/modules/sonarr/core/api_controller.dart

+4-1
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ class SonarrAPIController {
629629
}) async {
630630
if (context.read<SonarrState>().enabled) {
631631
series.id = 0;
632-
return await context
632+
final result = await context
633633
.read<SonarrState>()
634634
.api!
635635
.series
@@ -667,7 +667,10 @@ class SonarrAPIController {
667667
error: error,
668668
);
669669
}
670+
return SonarrSeries();
670671
});
672+
if (result.id == null) return null;
673+
return result;
671674
}
672675
return null;
673676
}

lib/widgets/ui/bottom_bar/badge.dart

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import 'package:badges/badges.dart';
1+
import 'package:badges/badges.dart' as badges;
22
import 'package:flutter/material.dart';
33
import 'package:lunasea/core.dart';
44

5-
class LunaNavigationBarBadge extends Badge {
5+
class LunaNavigationBarBadge extends badges.Badge {
66
LunaNavigationBarBadge({
77
Key? key,
88
required String text,
@@ -11,13 +11,16 @@ class LunaNavigationBarBadge extends Badge {
1111
required bool isActive,
1212
}) : super(
1313
key: key,
14-
badgeColor: LunaColours.accent.dimmed(),
15-
elevation: LunaUI.ELEVATION,
16-
animationDuration:
17-
const Duration(milliseconds: LunaUI.ANIMATION_SPEED_SCROLLING),
18-
animationType: BadgeAnimationType.scale,
19-
shape: BadgeShape.circle,
20-
position: BadgePosition.topEnd(
14+
badgeStyle: badges.BadgeStyle(
15+
badgeColor: LunaColours.accent.dimmed(),
16+
elevation: LunaUI.ELEVATION,
17+
shape: badges.BadgeShape.circle,
18+
),
19+
badgeAnimation: const badges.BadgeAnimation.scale(
20+
animationDuration:
21+
Duration(milliseconds: LunaUI.ANIMATION_SPEED_SCROLLING),
22+
),
23+
position: badges.BadgePosition.topEnd(
2124
top: -LunaUI.DEFAULT_MARGIN_SIZE,
2225
end: -LunaUI.DEFAULT_MARGIN_SIZE,
2326
),

lib/widgets/ui/message.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class LunaMessage extends StatelessWidget {
4949
if (LunaRouter.router.canPop()) {
5050
LunaRouter.router.pop();
5151
} else {
52-
LunaRouter.router.replace(DashboardRoutes.HOME.path);
52+
LunaRouter.router.pushReplacement(DashboardRoutes.HOME.path);
5353
}
5454
},
5555
useSafeArea: useSafeArea,

lib/widgets/ui/theme.dart

+15-15
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class LunaTheme {
2828
hoverColor: LunaColours.accent.withOpacity(LunaUI.OPACITY_SPLASH / 2),
2929
splashColor: LunaColours.accent.withOpacity(LunaUI.OPACITY_SPLASH),
3030
dialogBackgroundColor: LunaColours.secondary,
31-
toggleableActiveColor: LunaColours.accent,
3231
iconTheme: const IconThemeData(
3332
color: Colors.white,
3433
),
@@ -61,7 +60,6 @@ class LunaTheme {
6160
hoverColor: LunaColours.accent.withOpacity(LunaUI.OPACITY_SPLASH / 2),
6261
splashColor: LunaColours.accent.withOpacity(LunaUI.OPACITY_SPLASH),
6362
dialogBackgroundColor: Colors.black,
64-
toggleableActiveColor: LunaColours.accent,
6563
iconTheme: const IconThemeData(
6664
color: Colors.white,
6765
),
@@ -104,19 +102,21 @@ class LunaTheme {
104102
TextTheme get _sharedTextTheme {
105103
const textStyle = TextStyle(color: Colors.white);
106104
return const TextTheme(
107-
bodyText1: textStyle,
108-
bodyText2: textStyle,
109-
headline1: textStyle,
110-
headline2: textStyle,
111-
headline3: textStyle,
112-
headline4: textStyle,
113-
headline5: textStyle,
114-
headline6: textStyle,
115-
button: textStyle,
116-
caption: textStyle,
117-
subtitle1: textStyle,
118-
subtitle2: textStyle,
119-
overline: textStyle,
105+
displaySmall: textStyle,
106+
displayMedium: textStyle,
107+
displayLarge: textStyle,
108+
headlineSmall: textStyle,
109+
headlineMedium: textStyle,
110+
headlineLarge: textStyle,
111+
bodySmall: textStyle,
112+
bodyMedium: textStyle,
113+
bodyLarge: textStyle,
114+
titleSmall: textStyle,
115+
titleMedium: textStyle,
116+
titleLarge: textStyle,
117+
labelSmall: textStyle,
118+
labelMedium: textStyle,
119+
labelLarge: textStyle,
120120
);
121121
}
122122

macos/Flutter/GeneratedPluginRegistrant.swift

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ import firebase_auth
1010
import firebase_core
1111
import firebase_messaging
1212
import firebase_storage
13+
import in_app_purchase_storekit
1314
import package_info_plus
14-
import path_provider_macos
15+
import path_provider_foundation
1516
import screen_retriever
1617
import sentry_flutter
1718
import share_plus
18-
import shared_preferences_macos
19+
import shared_preferences_foundation
1920
import sqflite
2021
import url_launcher_macos
2122
import window_manager
@@ -26,6 +27,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
2627
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
2728
FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin"))
2829
FLTFirebaseStoragePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseStoragePlugin"))
30+
InAppPurchasePlugin.register(with: registry.registrar(forPlugin: "InAppPurchasePlugin"))
2931
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
3032
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
3133
ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin"))

macos/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
platform :osx, '10.14'
2-
$FirebaseSDKVersion = '10.2.0'
2+
$FirebaseSDKVersion = '10.3.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

0 commit comments

Comments
 (0)