diff --git a/lib/features/auth/screens/splash_screen.dart b/lib/features/auth/screens/splash_screen.dart index 82f7bc0..f7bfd3f 100644 --- a/lib/features/auth/screens/splash_screen.dart +++ b/lib/features/auth/screens/splash_screen.dart @@ -41,8 +41,6 @@ class _SplashScreenState extends State { Toast.showToast( message: 'New App Update Available! 🎉', context: context); } - }).catchError((e) { - Toast.showToast(message: e.toString(), context: context); }); } diff --git a/lib/features/theme/cubit/theme_cubit.dart b/lib/features/theme/cubit/theme_cubit.dart index 193d6ac..69674aa 100644 --- a/lib/features/theme/cubit/theme_cubit.dart +++ b/lib/features/theme/cubit/theme_cubit.dart @@ -17,6 +17,6 @@ class ThemeCubit extends Cubit { Future setDarkMode() async { bool? mode = prefs.getBool(LocalStorage.darkTheme); - emit(state.copyWith(darkMode: mode ?? false)); + emit(state.copyWith(darkMode: mode ?? true)); } } diff --git a/lib/utils/requests.dart b/lib/utils/requests.dart index 1713c4a..addcaeb 100644 --- a/lib/utils/requests.dart +++ b/lib/utils/requests.dart @@ -144,7 +144,7 @@ class Requests { return throw Exception('Invalid host url'); } - if (res.statusCode == 401) { + if (res.statusCode == 401 && !endpoint.contains('auth/login')) { await AuthRepo.tokenExpired(); return null; } diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index 1df583a..0e537e3 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:in_app_update/in_app_update.dart'; import 'package:logger/logger.dart'; +import 'package:pulse/utils/colors.dart'; import 'package:pulse/utils/text.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -35,6 +36,7 @@ class Toast { } ScaffoldMessenger.of(context).showSnackBar( SnackBar( + backgroundColor: Theme.of(context).appBarTheme.backgroundColor, action: message.contains('App Update') ? SnackBarAction( label: 'Update!', @@ -48,6 +50,7 @@ class Toast { style: kBodyTextStyle.copyWith(color: Colors.white), ), showCloseIcon: true, + closeIconColor: kGreyColor, duration: Duration(seconds: 6), ), ); diff --git a/lib/widgets/action_dialog.dart b/lib/widgets/action_dialog.dart index a80640b..5a635e4 100644 --- a/lib/widgets/action_dialog.dart +++ b/lib/widgets/action_dialog.dart @@ -70,8 +70,11 @@ class _ActionDialogState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text(widget.title, - style: kTitleTextStyle.copyWith( - fontSize: 16, color: Colors.black87)), + style: + Theme.of(context).textTheme.bodyMedium?.copyWith( + fontSize: 16, + fontWeight: FontWeight.bold, + )), SizedBox(height: 5), Text(widget.des, style: kTitleTextStyle.copyWith( diff --git a/pubspec.yaml b/pubspec.yaml index efb7aee..c350426 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ description: "A new Flutter project." # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: "none" # Remove this line if you wish to publish to pub.dev -version: 1.0.13+14 +version: 1.0.14+15 environment: sdk: ^3.6.1 diff --git a/screenshots/overview-dark.png b/screenshots/overview-dark.png new file mode 100644 index 0000000..fc2a0b0 Binary files /dev/null and b/screenshots/overview-dark.png differ diff --git a/screenshots/session-dark.png b/screenshots/session-dark.png new file mode 100644 index 0000000..ab89d82 Binary files /dev/null and b/screenshots/session-dark.png differ