Skip to content

Commit

Permalink
feat(flutter): upgrade to Flutter 3.7/b06b8b2710
Browse files Browse the repository at this point in the history
  • Loading branch information
JagandeepBrar committed Jan 27, 2023
1 parent 0b59b72 commit f1b831a
Show file tree
Hide file tree
Showing 11 changed files with 547 additions and 352 deletions.
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
platform :ios, '11.0'
$FirebaseSDKVersion = '10.2.0'
$FirebaseSDKVersion = '10.3.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
2 changes: 1 addition & 1 deletion lib/modules.dart
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ extension LunaModuleRoutingExtension on LunaModule {

Future<void> launch() async {
if (homeRoute != null) {
LunaRouter.router.replace(homeRoute!);
LunaRouter.router.pushReplacement(homeRoute!);
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion lib/modules/radarr/core/api_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class RadarrAPIHelper {
bool showSnackbar = true,
}) async {
if (context.read<RadarrState>().enabled) {
return await context
final result = await context
.read<RadarrState>()
.api!
.movie
Expand Down Expand Up @@ -120,7 +120,10 @@ class RadarrAPIHelper {
'Failed to add movie (tmdbId: ${movie.tmdbId})', error, stack);
if (showSnackbar)
showLunaErrorSnackBar(title: 'Failed to Add Movie', error: error);
return RadarrMovie();
});
if (result.id == null) return null;
return result;
}
return null;
}
Expand Down
5 changes: 4 additions & 1 deletion lib/modules/sonarr/core/api_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ class SonarrAPIController {
}) async {
if (context.read<SonarrState>().enabled) {
series.id = 0;
return await context
final result = await context
.read<SonarrState>()
.api!
.series
Expand Down Expand Up @@ -667,7 +667,10 @@ class SonarrAPIController {
error: error,
);
}
return SonarrSeries();
});
if (result.id == null) return null;
return result;
}
return null;
}
Expand Down
21 changes: 12 additions & 9 deletions lib/widgets/ui/bottom_bar/badge.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:badges/badges.dart';
import 'package:badges/badges.dart' as badges;
import 'package:flutter/material.dart';
import 'package:lunasea/core.dart';

class LunaNavigationBarBadge extends Badge {
class LunaNavigationBarBadge extends badges.Badge {
LunaNavigationBarBadge({
Key? key,
required String text,
Expand All @@ -11,13 +11,16 @@ class LunaNavigationBarBadge extends Badge {
required bool isActive,
}) : super(
key: key,
badgeColor: LunaColours.accent.dimmed(),
elevation: LunaUI.ELEVATION,
animationDuration:
const Duration(milliseconds: LunaUI.ANIMATION_SPEED_SCROLLING),
animationType: BadgeAnimationType.scale,
shape: BadgeShape.circle,
position: BadgePosition.topEnd(
badgeStyle: badges.BadgeStyle(
badgeColor: LunaColours.accent.dimmed(),
elevation: LunaUI.ELEVATION,
shape: badges.BadgeShape.circle,
),
badgeAnimation: const badges.BadgeAnimation.scale(
animationDuration:
Duration(milliseconds: LunaUI.ANIMATION_SPEED_SCROLLING),
),
position: badges.BadgePosition.topEnd(
top: -LunaUI.DEFAULT_MARGIN_SIZE,
end: -LunaUI.DEFAULT_MARGIN_SIZE,
),
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/ui/message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class LunaMessage extends StatelessWidget {
if (LunaRouter.router.canPop()) {
LunaRouter.router.pop();
} else {
LunaRouter.router.replace(DashboardRoutes.HOME.path);
LunaRouter.router.pushReplacement(DashboardRoutes.HOME.path);
}
},
useSafeArea: useSafeArea,
Expand Down
30 changes: 15 additions & 15 deletions lib/widgets/ui/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class LunaTheme {
hoverColor: LunaColours.accent.withOpacity(LunaUI.OPACITY_SPLASH / 2),
splashColor: LunaColours.accent.withOpacity(LunaUI.OPACITY_SPLASH),
dialogBackgroundColor: LunaColours.secondary,
toggleableActiveColor: LunaColours.accent,
iconTheme: const IconThemeData(
color: Colors.white,
),
Expand Down Expand Up @@ -61,7 +60,6 @@ class LunaTheme {
hoverColor: LunaColours.accent.withOpacity(LunaUI.OPACITY_SPLASH / 2),
splashColor: LunaColours.accent.withOpacity(LunaUI.OPACITY_SPLASH),
dialogBackgroundColor: Colors.black,
toggleableActiveColor: LunaColours.accent,
iconTheme: const IconThemeData(
color: Colors.white,
),
Expand Down Expand Up @@ -104,19 +102,21 @@ class LunaTheme {
TextTheme get _sharedTextTheme {
const textStyle = TextStyle(color: Colors.white);
return const TextTheme(
bodyText1: textStyle,
bodyText2: textStyle,
headline1: textStyle,
headline2: textStyle,
headline3: textStyle,
headline4: textStyle,
headline5: textStyle,
headline6: textStyle,
button: textStyle,
caption: textStyle,
subtitle1: textStyle,
subtitle2: textStyle,
overline: textStyle,
displaySmall: textStyle,
displayMedium: textStyle,
displayLarge: textStyle,
headlineSmall: textStyle,
headlineMedium: textStyle,
headlineLarge: textStyle,
bodySmall: textStyle,
bodyMedium: textStyle,
bodyLarge: textStyle,
titleSmall: textStyle,
titleMedium: textStyle,
titleLarge: textStyle,
labelSmall: textStyle,
labelMedium: textStyle,
labelLarge: textStyle,
);
}

Expand Down
6 changes: 4 additions & 2 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ import firebase_auth
import firebase_core
import firebase_messaging
import firebase_storage
import in_app_purchase_storekit
import package_info_plus
import path_provider_macos
import path_provider_foundation
import screen_retriever
import sentry_flutter
import share_plus
import shared_preferences_macos
import shared_preferences_foundation
import sqflite
import url_launcher_macos
import window_manager
Expand All @@ -26,6 +27,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin"))
FLTFirebaseStoragePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseStoragePlugin"))
InAppPurchasePlugin.register(with: registry.registrar(forPlugin: "InAppPurchasePlugin"))
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin"))
Expand Down
2 changes: 1 addition & 1 deletion macos/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
platform :osx, '10.14'
$FirebaseSDKVersion = '10.2.0'
$FirebaseSDKVersion = '10.3.0'

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

0 comments on commit f1b831a

Please sign in to comment.