diff --git a/ios/Podfile.lock b/ios/Podfile.lock index b641993..afdd2f1 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2,6 +2,8 @@ PODS: - Flutter (1.0.0) - flutter_secure_storage (6.0.0): - Flutter + - flutter_statusbarcolor_ns (0.0.1): + - Flutter - FMDB (2.7.5): - FMDB/standard (= 2.7.5) - FMDB/standard (2.7.5) @@ -18,6 +20,7 @@ PODS: DEPENDENCIES: - Flutter (from `Flutter`) - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) + - flutter_statusbarcolor_ns (from `.symlinks/plugins/flutter_statusbarcolor_ns/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - sqflite (from `.symlinks/plugins/sqflite/ios`) @@ -31,6 +34,8 @@ EXTERNAL SOURCES: :path: Flutter flutter_secure_storage: :path: ".symlinks/plugins/flutter_secure_storage/ios" + flutter_statusbarcolor_ns: + :path: ".symlinks/plugins/flutter_statusbarcolor_ns/ios" path_provider_foundation: :path: ".symlinks/plugins/path_provider_foundation/darwin" shared_preferences_foundation: @@ -41,6 +46,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be + flutter_statusbarcolor_ns: 68a360889d88d7915ae524e422aeab62e4063804 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 diff --git a/lib/app/app.dart b/lib/app/app.dart index f8c7b45..ce8b5ba 100644 --- a/lib/app/app.dart +++ b/lib/app/app.dart @@ -4,6 +4,7 @@ import 'package:receipe_app/ui/views/edit_dish/edit_dish_view.dart'; import 'package:sqflite_migration_service/sqflite_migration_service.dart'; import 'package:stacked/stacked_annotations.dart'; import 'package:stacked_services/stacked_services.dart'; +import 'package:stacked_themes/stacked_themes.dart'; import '../services/event_service.dart'; import '../ui/bottom_sheets/notice/notice_sheet.dart'; import '../ui/dialogs/info_alert/info_alert_dialog.dart'; @@ -49,6 +50,7 @@ import 'package:receipe_app/ui/views/single_user/single_user_view.dart'; LazySingleton(classType: DatabaseMigrationService), InitializableSingleton(classType: DatabaseService), LazySingleton(classType: UserService), + Singleton(classType: ThemeService, resolveUsing: ThemeService.getInstance) // @stacked-service ], bottomsheets: [ diff --git a/lib/app/app.locator.dart b/lib/app/app.locator.dart index d6fa87c..b6cf56f 100644 --- a/lib/app/app.locator.dart +++ b/lib/app/app.locator.dart @@ -11,6 +11,7 @@ import 'package:stacked_services/src/bottom_sheet/bottom_sheet_service.dart'; import 'package:stacked_services/src/dialog/dialog_service.dart'; import 'package:stacked_services/src/navigation/navigation_service.dart'; import 'package:stacked_shared/stacked_shared.dart'; +import 'package:stacked_themes/src/theme_service.dart'; import '../services/authentication_service.dart'; import '../services/database_service.dart'; @@ -45,4 +46,5 @@ Future setupLocator({ locator.registerSingleton(databaseService); locator.registerLazySingleton(() => UserService()); + locator.registerSingleton(ThemeService.getInstance()); } diff --git a/lib/main.dart b/lib/main.dart index 5beb75f..3e91989 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -9,11 +9,13 @@ import 'app/app.locator.dart'; import 'app/app.router.dart'; import 'generated/l10n.dart'; import 'ui/common/app_themes.dart'; +import 'package:stacked_themes/stacked_themes.dart'; Future main() async { WidgetsFlutterBinding.ensureInitialized(); SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); await setupLocator(); + await ThemeManager.initialise(); setupDialogUi(); setupBottomSheetUi(); runApp(const MainApp()); @@ -30,20 +32,30 @@ class MainApp extends StatelessWidget { splitScreenMode: true, ensureScreenSize: true, builder: (context, child) { - return MaterialApp( - onGenerateRoute: StackedRouter().onGenerateRoute, - navigatorKey: StackedService.navigatorKey, - theme: AppThemes.lightTheme, - navigatorObservers: [ - StackedService.routeObserver, - ], - localizationsDelegates: const [ - S.delegate, - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - ], - supportedLocales: S.delegate.supportedLocales, + return ThemeBuilder( + lightTheme: AppThemes.lightTheme, + darkTheme: AppThemes.darkTheme, + builder: (context, lightTheme, darkTheme, themeMode) { + return MaterialApp( + //theme: AppThemes.lightTheme, + theme: lightTheme, + darkTheme: darkTheme, + themeMode: themeMode, + onGenerateRoute: StackedRouter().onGenerateRoute, + navigatorKey: StackedService.navigatorKey, + + navigatorObservers: [ + StackedService.routeObserver, + ], + localizationsDelegates: const [ + S.delegate, + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + ], + supportedLocales: S.delegate.supportedLocales, + ); + }, ); }, ); diff --git a/lib/ui/common/app_themes.dart b/lib/ui/common/app_themes.dart index 0161f02..4bef9b3 100644 --- a/lib/ui/common/app_themes.dart +++ b/lib/ui/common/app_themes.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:receipe_app/ui/common/color_schemes.g.dart'; import '../extension/app_typography.dart'; import '../extension/palette.dart'; import 'app_colors.dart'; @@ -11,9 +12,7 @@ class AppThemes { return ThemeData( useMaterial3: true, primaryColor: AppColors.primary6, - colorScheme: ColorScheme.fromSeed( - seedColor: AppColors.primary6, brightness: Brightness.light), - brightness: Brightness.light, + colorScheme: lightColorScheme, scaffoldBackgroundColor: AppColors.white, appBarTheme: const AppBarTheme( backgroundColor: Colors.white, @@ -84,4 +83,81 @@ class AppThemes { ], ); } + + //Dark Theme + static ThemeData get darkTheme { + return ThemeData( + useMaterial3: true, + primaryColor: AppColors.primary6, + //brightness: Brightness.dark, + colorScheme: darkColorScheme, + appBarTheme: const AppBarTheme( + backgroundColor: AppColors.primary11, + elevation: 0, + centerTitle: true, + iconTheme: IconThemeData(color: Colors.black), + ), + textSelectionTheme: + const TextSelectionThemeData(cursorColor: AppColors.primary6), + inputDecorationTheme: InputDecorationTheme( + hintStyle: AppTextStyles.titleRegular16.copyWith( + color: AppColors.gray9, + ), + labelStyle: AppTextStyles.labelRegular12.copyWith( + color: AppColors.gray9, + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(4.r), + borderSide: const BorderSide( + color: AppColors.gray6, + ), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(4.r), + borderSide: const BorderSide( + color: AppColors.primary6, + ), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(4.r), + borderSide: const BorderSide( + color: AppColors.primary6, + ), + ), + ), + extensions: >[ + AppTypography( + headlineBold28: AppTextStyles.headlineBold28, + headlineBold24: AppTextStyles.headlineBold24, + headlineBold22: AppTextStyles.headlineBold22, + titleRegular16: AppTextStyles.titleRegular16, + titleBold16: AppTextStyles.titleBold16, + labelRegular12: AppTextStyles.labelRegular12, + labelMedium16: AppTextStyles.labelMedium16, + labelRegular14: AppTextStyles.labelRegular14, + labelRegular16: AppTextStyles.labelRegular16, + ), + const Palette( + gray1: AppColors.gray1, + gray6: AppColors.gray6, + gray7: AppColors.gray7, + gray8: AppColors.gray8, + gray9: AppColors.gray9, + gray11: AppColors.gray11, + primary6: AppColors.primary6, + primary11: AppColors.primary11, + gray12: AppColors.gray12, + gray13: AppColors.grey13, + redShade: AppColors.redShade, + popUpBg: AppColors.popUpBg, + barrierColor: AppColors.barrierColor, + iconBackground2: AppColors.iconBackground2, + iconBackground3: AppColors.iconBackground3, + orangeShade: AppColors.orangeShade, + iconBackground: AppColors.iconBackground, + white: AppColors.white, + ), + ], + ); + } } diff --git a/lib/ui/common/color_schemes.g.dart b/lib/ui/common/color_schemes.g.dart new file mode 100644 index 0000000..bebf2df --- /dev/null +++ b/lib/ui/common/color_schemes.g.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; + +const lightColorScheme = ColorScheme( + brightness: Brightness.light, + primary: Color(0xFFA04100), + onPrimary: Color(0xFFFFFFFF), + primaryContainer: Color(0xFFFFDBCB), + onPrimaryContainer: Color(0xFF341000), + secondary: Color(0xFF765849), + onSecondary: Color(0xFFFFFFFF), + secondaryContainer: Color(0xFFFFDBCB), + onSecondaryContainer: Color(0xFF2C160B), + tertiary: Color(0xFF97480F), + onTertiary: Color(0xFFFFFFFF), + tertiaryContainer: Color(0xFFFFDBC9), + onTertiaryContainer: Color(0xFF331200), + error: Color(0xFFBA1A1A), + errorContainer: Color(0xFFFFDAD6), + onError: Color(0xFFFFFFFF), + onErrorContainer: Color(0xFF410002), + background: Color(0xFFFFFBFF), + onBackground: Color(0xFF201A18), + surface: Color(0xFFFFFBFF), + onSurface: Color(0xFF201A18), + surfaceVariant: Color(0xFFF4DED5), + onSurfaceVariant: Color(0xFF52443D), + outline: Color(0xFF85736C), + onInverseSurface: Color(0xFFFBEEE9), + inverseSurface: Color(0xFF362F2C), + inversePrimary: Color(0xFFFFB692), + shadow: Color(0xFF000000), + surfaceTint: Color(0xFFA04100), + outlineVariant: Color(0xFFD7C2B9), + scrim: Color(0xFF000000), +); + +const darkColorScheme = ColorScheme( + brightness: Brightness.dark, + primary: Color(0xFFFFB692), + onPrimary: Color(0xFF562000), + primaryContainer: Color(0xFF7A3000), + onPrimaryContainer: Color(0xFFFFDBCB), + secondary: Color(0xFFE6BEAC), + onSecondary: Color(0xFF432A1E), + secondaryContainer: Color(0xFF5C4033), + onSecondaryContainer: Color(0xFFFFDBCB), + tertiary: Color(0xFFFFB68D), + onTertiary: Color(0xFF532200), + tertiaryContainer: Color(0xFF763300), + onTertiaryContainer: Color(0xFFFFDBC9), + error: Color(0xFFFFB4AB), + errorContainer: Color(0xFF93000A), + onError: Color(0xFF690005), + onErrorContainer: Color(0xFFFFDAD6), + background: Color(0xFF201A18), + onBackground: Color(0xFFEDE0DB), + surface: Color(0xFF201A18), + onSurface: Color(0xFFEDE0DB), + surfaceVariant: Color(0xFF52443D), + onSurfaceVariant: Color(0xFFD7C2B9), + outline: Color(0xFFA08D85), + onInverseSurface: Color(0xFF201A18), + inverseSurface: Color(0xFFEDE0DB), + inversePrimary: Color(0xFFA04100), + shadow: Color(0xFF000000), + surfaceTint: Color(0xFFFFB692), + outlineVariant: Color(0xFF52443D), + scrim: Color(0xFF000000), +); diff --git a/lib/ui/views/edit_dish/edit_dish_view.dart b/lib/ui/views/edit_dish/edit_dish_view.dart index 3518708..7bfe4fa 100644 --- a/lib/ui/views/edit_dish/edit_dish_view.dart +++ b/lib/ui/views/edit_dish/edit_dish_view.dart @@ -26,7 +26,7 @@ class EditDishView extends StackedView with $EditDishView { centerTitle: true, elevation: 0, foregroundColor: context.palette?.gray12, - backgroundColor: Colors.white, + //backgroundColor: Colors.white, title: Text( S.current.edit_dish, style: context.typography?.titleBold16?.copyWith( diff --git a/lib/ui/views/home/home_view.dart b/lib/ui/views/home/home_view.dart index c1b5f31..fad10a6 100644 --- a/lib/ui/views/home/home_view.dart +++ b/lib/ui/views/home/home_view.dart @@ -27,7 +27,7 @@ class HomeView extends StackedView { key: homeScaffoldKey, drawer: AppDrawer(), appBar: AppBar( - backgroundColor: kcBackground, + //backgroundColor: kcBackground, elevation: 0, leading: InkWell( onTap: () { @@ -48,11 +48,7 @@ class HomeView extends StackedView { ), ), ), - title: Text( - S.current.home, - style: context.typography?.titleBold16 - ?.copyWith(color: context.palette?.gray11), - ), + title: Text(S.current.home, style: context.typography?.titleBold16), ), body: SafeArea( child: OverlayLoader( diff --git a/lib/ui/views/home/widgets/product_item.dart b/lib/ui/views/home/widgets/product_item.dart index bfb394e..390b35e 100644 --- a/lib/ui/views/home/widgets/product_item.dart +++ b/lib/ui/views/home/widgets/product_item.dart @@ -50,7 +50,7 @@ class ProductItem extends StatelessWidget { ), RichTextWidget( color1: context.palette?.gray8, - color2: context.palette?.gray11, + color2: context.palette?.gray9, text1: S.current.date_created, text2: recipe?.datePosted ?? '--', ), diff --git a/lib/ui/views/new_dish/new_dish_view.dart b/lib/ui/views/new_dish/new_dish_view.dart index dc2435c..f59f1cc 100644 --- a/lib/ui/views/new_dish/new_dish_view.dart +++ b/lib/ui/views/new_dish/new_dish_view.dart @@ -35,7 +35,6 @@ class NewDishView extends StackedView with $NewDishView { key: newDishScaffoldKey, drawer: AppDrawer(), appBar: AppBar( - elevation: 0, leading: InkWell( onTap: () { newDishScaffoldKey.currentState!.openDrawer(); @@ -57,8 +56,7 @@ class NewDishView extends StackedView with $NewDishView { ), title: Text( S.current.create_a_dish, - style: context.typography?.titleBold16 - ?.copyWith(color: context.palette?.gray11), + style: context.typography?.titleBold16, ), ), body: Builder(builder: (context) { diff --git a/lib/ui/views/single_user/single_user_view.dart b/lib/ui/views/single_user/single_user_view.dart index f335747..e8dc8eb 100644 --- a/lib/ui/views/single_user/single_user_view.dart +++ b/lib/ui/views/single_user/single_user_view.dart @@ -27,8 +27,6 @@ class SingleUserView extends StackedView { key: homeScaffoldKey, drawer: AppDrawer(), appBar: AppBar( - backgroundColor: kcBackground, - elevation: 0, leading: InkWell( onTap: () { homeScaffoldKey.currentState!.openDrawer(); @@ -48,20 +46,14 @@ class SingleUserView extends StackedView { ), ), ), - title: Text( - S.current.mydish, - style: context.typography?.titleBold16 - ?.copyWith(color: context.palette?.gray11), - ), + title: Text(S.current.mydish, style: context.typography?.titleBold16), ), body: SafeArea( child: OverlayLoader( isBusy: viewModel.isBusy, content: Column( children: [ - SizedBox( - height: 18.h, - ), + SizedBox(height: 18.h), Builder( builder: (context) { //Error diff --git a/lib/ui/widgets/common/app_drawer/app_drawer.dart b/lib/ui/widgets/common/app_drawer/app_drawer.dart index d8b3c20..b3f0d30 100644 --- a/lib/ui/widgets/common/app_drawer/app_drawer.dart +++ b/lib/ui/widgets/common/app_drawer/app_drawer.dart @@ -70,7 +70,7 @@ class AppDrawer extends StackedView { S.current.my_dish, style: TextStyle( fontSize: 15.sp, - color: context.palette?.gray11, + //color: context.palette?.gray11, fontWeight: FontWeight.bold, ), ), @@ -86,23 +86,39 @@ class AppDrawer extends StackedView { S.current.dark_mode, style: TextStyle( fontSize: 15.sp, - color: context.palette?.gray11, fontWeight: FontWeight.bold, ), ), trailing: Platform.isIOS - ? CupertinoSwitch(value: true, onChanged: (bool value) {}) + ? CupertinoSwitch( + value: viewModel.switchValue, + onChanged: (bool value) { + viewModel.toggleThemeMode(value); + }, + ) : Switch( - value: false, - onChanged: (bool value) {}, + value: viewModel.switchValue, + onChanged: (bool value) { + // viewModel.themeValue = newValue + viewModel.toggleThemeMode(value); + }, ), ), SizedBox(height: 10.h), - Divider(thickness: 15.w, color: context.palette?.gray1), + // MaterialButton( + // onPressed: () { + // viewModel.toggleThemeMode(); + // }, + // child: Text('switch'), + // ), + Divider( + thickness: 15.w, + //color: context.palette?.gray1, + ), Spacer(), Divider( thickness: 10.w, - color: context.palette?.gray1, + //color: context.palette?.gray1, ), ListTile( onTap: viewModel.logout, diff --git a/lib/ui/widgets/common/app_drawer/app_drawer_model.dart b/lib/ui/widgets/common/app_drawer/app_drawer_model.dart index 4e4f933..030116c 100644 --- a/lib/ui/widgets/common/app_drawer/app_drawer_model.dart +++ b/lib/ui/widgets/common/app_drawer/app_drawer_model.dart @@ -7,14 +7,19 @@ import 'package:receipe_app/app/app.locator.dart'; import 'package:receipe_app/app/app.logger.dart'; import 'package:stacked_services/stacked_services.dart'; +import 'package:stacked_themes/stacked_themes.dart'; class AppDrawerModel extends ReactiveViewModel { final _navigationService = locator(); final _userService = locator(); final _secureStorageService = locator(); - + final _themeService = locator(); User? get user => _userService.user; + //bool? _switchValue = false; + // bool get switchValue => _switchValue; + bool get switchValue => _themeService.isDarkMode; + final _logger = getLogger('App_Drawer'); void navigateToHome() { @@ -37,6 +42,15 @@ class AppDrawerModel extends ReactiveViewModel { _navigationService.clearStackAndShow(Routes.loginView); } + ///toggleThemeMode acts as a function and a setter + void toggleThemeMode(bool themeValue) { + //if (themeValue == true || themeValue == false) { + _themeService.toggleDarkLightTheme(); + //} + //_switchValue = themeValue; + rebuildUi(); + } + @override List get listenableServices => [_userService]; } diff --git a/lib/ui/widgets/common/overlay_loader/overlay_loader.dart b/lib/ui/widgets/common/overlay_loader/overlay_loader.dart index 6d65af3..7c24c33 100644 --- a/lib/ui/widgets/common/overlay_loader/overlay_loader.dart +++ b/lib/ui/widgets/common/overlay_loader/overlay_loader.dart @@ -27,7 +27,7 @@ class OverlayLoader extends StackedView { child: Container( padding: const EdgeInsets.all(20), decoration: BoxDecoration( - color: context.palette?.gray6, + color: context.palette?.gray9, borderRadius: BorderRadius.circular(5.r), ), child: const CircularProgressIndicator.adaptive(), diff --git a/lib/ui/widgets/common/primary_button/primary_button.dart b/lib/ui/widgets/common/primary_button/primary_button.dart index 8e9be4c..ecb3569 100644 --- a/lib/ui/widgets/common/primary_button/primary_button.dart +++ b/lib/ui/widgets/common/primary_button/primary_button.dart @@ -43,12 +43,11 @@ class PrimaryButton extends StackedView { height: 56.h, width: double.infinity, child: Center( - child: Text( - buttonText, - style: context.typography?.titleBold16?.copyWith( - color: textColor ?? context.palette?.gray1, - ), - ), + child: Text(buttonText, style: context.typography?.titleBold16 + // copyWith( + // color: textColor ?? context.palette?.gray1, + // ), + ), ), ), ), diff --git a/pubspec.lock b/pubspec.lock index 0992e05..dc822cd 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -173,10 +173,10 @@ packages: dependency: transitive description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.18.0" convert: dependency: transitive description: @@ -339,6 +339,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.0" + flutter_statusbarcolor_ns: + dependency: transitive + description: + name: flutter_statusbarcolor_ns + sha256: "28ad644daac2d692b6d0d576458b7967f1aaeaf212eddfcb40ec8b5e68621abc" + url: "https://pub.dev" + source: hosted + version: "0.5.0" flutter_svg: dependency: "direct main" description: @@ -513,10 +521,10 @@ packages: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" mime: dependency: transitive description: @@ -830,10 +838,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stacked: dependency: "direct main" description: @@ -866,14 +874,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.0" + stacked_themes: + dependency: "direct main" + description: + name: stacked_themes + sha256: dafbaf33af31ef19d1aca467c8dfd5fcff778a00945fede67b308d8d60577288 + url: "https://pub.dev" + source: hosted + version: "0.3.12" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -910,10 +926,10 @@ packages: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.6.1" timing: dependency: transitive description: @@ -990,10 +1006,10 @@ packages: dependency: transitive description: name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 url: "https://pub.dev" source: hosted - version: "0.1.4-beta" + version: "0.3.0" web_socket_channel: dependency: transitive description: @@ -1035,5 +1051,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.1.0 <4.0.0" + dart: ">=3.2.0-194.0.dev <4.0.0" flutter: ">=3.13.0" diff --git a/pubspec.yaml b/pubspec.yaml index 43b775f..dee9810 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -24,6 +24,7 @@ dependencies: sqflite_migration_service: ^2.0.0-nullsafety.1 stacked: ^3.4.1+1 stacked_services: ^1.3.0 + stacked_themes: ^0.3.12 dev_dependencies: build_runner: ^2.4.6 diff --git a/test/helpers/test_helpers.mocks.dart b/test/helpers/test_helpers.mocks.dart index 72a8236..c457e53 100644 --- a/test/helpers/test_helpers.mocks.dart +++ b/test/helpers/test_helpers.mocks.dart @@ -944,6 +944,29 @@ class MockDishService extends _i1.Mock implements _i17.DishService { ), )), ) as _i6.Future<_i2.RecipesResponseModel>); + @override + _i6.Future<_i2.RecipesResponseModel> getUserDishes() => (super.noSuchMethod( + Invocation.method( + #getUserDishes, + [], + ), + returnValue: _i6.Future<_i2.RecipesResponseModel>.value( + _FakeRecipesResponseModel_0( + this, + Invocation.method( + #getUserDishes, + [], + ), + )), + returnValueForMissingStub: _i6.Future<_i2.RecipesResponseModel>.value( + _FakeRecipesResponseModel_0( + this, + Invocation.method( + #getUserDishes, + [], + ), + )), + ) as _i6.Future<_i2.RecipesResponseModel>); } /// A class which mocks [DatabaseService].