diff --git a/build.yaml b/build.yaml index 551a53b1..035e86b1 100644 --- a/build.yaml +++ b/build.yaml @@ -1,10 +1,24 @@ +global_options: + flutter_navigation_generator:flutter_navigator_builder: + runs_before: + - mockito|mockBuilder + targets: $default: builders: + flutter_navigation_generator:flutter_route_builder: + generate_for: + include: + - lib/screen/**.dart + flutter_navigation_generator:flutter_navigator_builder: + generate_for: + include: + - lib/navigator/main_navigator.dart drift_dev: generate_for: include: - lib/database/**.dart + - lib/model/database/**.dart # Should be removed in the future retrofit_generator|retrofit: enabled: true @@ -24,12 +38,4 @@ targets: injectable_generator:injectable_config_builder: generate_for: include: - - lib/di/injectable.dart - flutter_navigation_generator:flutter_route_builder: - generate_for: - include: - - lib/screen/**.dart - flutter_navigation_generator:flutter_navigator_builder: - generate_for: - include: - - lib/navigator/main_navigator.dart \ No newline at end of file + - lib/di/injectable.dart \ No newline at end of file diff --git a/lib/widget/general/bottom_navigation/bottom_navigation_item.dart b/lib/widget/general/bottom_navigation/bottom_navigation_item.dart index 5cc6f8f3..5e198002 100644 --- a/lib/widget/general/bottom_navigation/bottom_navigation_item.dart +++ b/lib/widget/general/bottom_navigation/bottom_navigation_item.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_template/styles/theme_dimens.dart'; import 'package:flutter_template/styles/theme_durations.dart'; -import 'package:flutter_template/util/extension/text_scaler_extension.dart'; +import 'package:flutter_template/util/extension/text_scaler_extensions.dart'; import 'package:flutter_template/widget/animation/animated_color_filter.dart'; import 'package:flutter_template/widget/provider/data_provider_widget.dart'; import 'package:icapps_architecture/icapps_architecture.dart'; diff --git a/test/util/test_util.mocks.dart b/test/util/test_util.mocks.dart index ff3c816b..27633f7e 100644 --- a/test/util/test_util.mocks.dart +++ b/test/util/test_util.mocks.dart @@ -4,17 +4,17 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i5; -import 'dart:ui' as _i3; +import 'dart:ui' as _i4; import 'package:drift/drift.dart' as _i11; -import 'package:flutter/material.dart' as _i4; +import 'package:flutter/material.dart' as _i1; import 'package:flutter_template/model/snackbar/snackbar_data.dart' as _i12; import 'package:flutter_template/navigator/main_navigator.dart' as _i10; import 'package:flutter_template/util/locale/localization.dart' as _i7; import 'package:flutter_template/util/snackbar/error_util.dart' as _i9; -import 'package:flutter_template/viewmodel/global/global_viewmodel.dart' as _i2; +import 'package:flutter_template/viewmodel/global/global_viewmodel.dart' as _i3; import 'package:icapps_architecture/icapps_architecture.dart' as _i8; -import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/mockito.dart' as _i2; import 'package:mockito/src/dummies.dart' as _i6; // ignore_for_file: type=lint @@ -30,25 +30,36 @@ import 'package:mockito/src/dummies.dart' as _i6; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +class _FakeGlobalKey_0> + extends _i2.SmartFake implements _i1.GlobalKey { + _FakeGlobalKey_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [GlobalViewModel]. /// /// See the documentation for Mockito's code generation for more information. -class MockGlobalViewModel extends _i1.Mock implements _i2.GlobalViewModel { +class MockGlobalViewModel extends _i2.Mock implements _i3.GlobalViewModel { MockGlobalViewModel() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } @override - List<_i3.Locale> get supportedLocales => (super.noSuchMethod( + List<_i4.Locale> get supportedLocales => (super.noSuchMethod( Invocation.getter(#supportedLocales), - returnValue: <_i3.Locale>[], - ) as List<_i3.Locale>); + returnValue: <_i4.Locale>[], + ) as List<_i4.Locale>); @override - _i4.ThemeMode get themeMode => (super.noSuchMethod( + _i1.ThemeMode get themeMode => (super.noSuchMethod( Invocation.getter(#themeMode), - returnValue: _i4.ThemeMode.system, - ) as _i4.ThemeMode); + returnValue: _i1.ThemeMode.system, + ) as _i1.ThemeMode); @override bool get showsTranslationKeys => (super.noSuchMethod( @@ -79,7 +90,7 @@ class MockGlobalViewModel extends _i1.Mock implements _i2.GlobalViewModel { ) as _i5.Future); @override - _i5.Future updateThemeMode(_i4.ThemeMode? themeMode) => + _i5.Future updateThemeMode(_i1.ThemeMode? themeMode) => (super.noSuchMethod( Invocation.method( #updateThemeMode, @@ -223,7 +234,7 @@ class MockGlobalViewModel extends _i1.Mock implements _i2.GlobalViewModel { ); @override - void addListener(_i3.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i4.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -232,7 +243,7 @@ class MockGlobalViewModel extends _i1.Mock implements _i2.GlobalViewModel { ); @override - void removeListener(_i3.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -272,15 +283,15 @@ class MockGlobalViewModel extends _i1.Mock implements _i2.GlobalViewModel { /// A class which mocks [ErrorUtil]. /// /// See the documentation for Mockito's code generation for more information. -class MockErrorUtil extends _i1.Mock implements _i9.ErrorUtil { +class MockErrorUtil extends _i2.Mock implements _i9.ErrorUtil { MockErrorUtil() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } @override String? showError({ required dynamic error, - required _i4.BuildContext? context, + required _i1.BuildContext? context, }) => (super.noSuchMethod(Invocation.method( #showError, @@ -294,7 +305,7 @@ class MockErrorUtil extends _i1.Mock implements _i9.ErrorUtil { @override void showErrorWithLocaleKey({ required String? messageKey, - required _i4.BuildContext? context, + required _i1.BuildContext? context, String? titleKey, List? args, }) => @@ -316,11 +327,20 @@ class MockErrorUtil extends _i1.Mock implements _i9.ErrorUtil { /// A class which mocks [MainNavigator]. /// /// See the documentation for Mockito's code generation for more information. -class MockMainNavigator extends _i1.Mock implements _i10.MainNavigator { +class MockMainNavigator extends _i2.Mock implements _i10.MainNavigator { MockMainNavigator() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } + @override + _i1.GlobalKey<_i1.NavigatorState> get navigatorKey => (super.noSuchMethod( + Invocation.getter(#navigatorKey), + returnValue: _FakeGlobalKey_0<_i1.NavigatorState>( + this, + Invocation.getter(#navigatorKey), + ), + ) as _i1.GlobalKey<_i1.NavigatorState>); + @override _i5.Future goToDatabase(_i11.GeneratedDatabase? db) => (super.noSuchMethod( @@ -379,4 +399,170 @@ class MockMainNavigator extends _i1.Mock implements _i10.MainNavigator { returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); + + @override + _i1.Route? onGenerateRoute(_i1.RouteSettings? settings) => + (super.noSuchMethod(Invocation.method( + #onGenerateRoute, + [settings], + )) as _i1.Route?); + + @override + void goToHomeScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToHomeScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + void goToSplashScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToSplashScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + _i5.Future goToLicenseScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToLicenseScreen, + [], + {#key: key}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future goToTodoAddScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToTodoAddScreen, + [], + {#key: key}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future goToAnalyticsPermissionScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToAnalyticsPermissionScreen, + [], + {#key: key}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + void goToLoginScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToLoginScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + _i5.Future goToThemeModeSelectorScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToThemeModeSelectorScreen, + [], + {#key: key}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future goToDebugPlatformSelectorScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToDebugPlatformSelectorScreen, + [], + {#key: key}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future goToDebugScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToDebugScreen, + [], + {#key: key}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + void goBack() => super.noSuchMethod( + Invocation.method( + #goBack, + [], + ), + returnValueForMissingStub: null, + ); + + @override + void goBackWithResult({T? result}) => super.noSuchMethod( + Invocation.method( + #goBackWithResult, + [], + {#result: result}, + ), + returnValueForMissingStub: null, + ); + + @override + void popUntil(bool Function(_i1.Route)? predicate) => + super.noSuchMethod( + Invocation.method( + #popUntil, + [predicate], + ), + returnValueForMissingStub: null, + ); + + @override + void goBackTo(String? routeName) => super.noSuchMethod( + Invocation.method( + #goBackTo, + [routeName], + ), + returnValueForMissingStub: null, + ); + + @override + _i5.Future showCustomDialog({_i1.Widget? widget}) => + (super.noSuchMethod( + Invocation.method( + #showCustomDialog, + [], + {#widget: widget}, + ), + returnValue: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future showBottomSheet({_i1.Widget? widget}) => + (super.noSuchMethod( + Invocation.method( + #showBottomSheet, + [], + {#widget: widget}, + ), + returnValue: _i5.Future.value(), + ) as _i5.Future); } diff --git a/test/viewmodel/debug/debug_platform_selector_viewmodel_test.mocks.dart b/test/viewmodel/debug/debug_platform_selector_viewmodel_test.mocks.dart index 4271344f..798655b7 100644 --- a/test/viewmodel/debug/debug_platform_selector_viewmodel_test.mocks.dart +++ b/test/viewmodel/debug/debug_platform_selector_viewmodel_test.mocks.dart @@ -3,12 +3,13 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i3; +import 'dart:async' as _i4; -import 'package:drift/drift.dart' as _i4; -import 'package:flutter_template/model/snackbar/snackbar_data.dart' as _i5; -import 'package:flutter_template/navigator/main_navigator.dart' as _i2; -import 'package:mockito/mockito.dart' as _i1; +import 'package:drift/drift.dart' as _i5; +import 'package:flutter/material.dart' as _i1; +import 'package:flutter_template/model/snackbar/snackbar_data.dart' as _i6; +import 'package:flutter_template/navigator/main_navigator.dart' as _i3; +import 'package:mockito/mockito.dart' as _i2; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -23,24 +24,44 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +class _FakeGlobalKey_0> + extends _i2.SmartFake implements _i1.GlobalKey { + _FakeGlobalKey_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [MainNavigator]. /// /// See the documentation for Mockito's code generation for more information. -class MockMainNavigator extends _i1.Mock implements _i2.MainNavigator { +class MockMainNavigator extends _i2.Mock implements _i3.MainNavigator { MockMainNavigator() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } @override - _i3.Future goToDatabase(_i4.GeneratedDatabase? db) => + _i1.GlobalKey<_i1.NavigatorState> get navigatorKey => (super.noSuchMethod( + Invocation.getter(#navigatorKey), + returnValue: _FakeGlobalKey_0<_i1.NavigatorState>( + this, + Invocation.getter(#navigatorKey), + ), + ) as _i1.GlobalKey<_i1.NavigatorState>); + + @override + _i4.Future goToDatabase(_i5.GeneratedDatabase? db) => (super.noSuchMethod( Invocation.method( #goToDatabase, [db], ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override void showErrorWithLocaleKey({ @@ -71,10 +92,10 @@ class MockMainNavigator extends _i1.Mock implements _i2.MainNavigator { ); @override - _i3.Future showCustomSnackBar({ + _i4.Future showCustomSnackBar({ required String? message, String? title, - _i5.SnackBarStyle? style = _i5.SnackBarStyle.neutral, + _i6.SnackBarStyle? style = _i6.SnackBarStyle.neutral, }) => (super.noSuchMethod( Invocation.method( @@ -86,7 +107,173 @@ class MockMainNavigator extends _i1.Mock implements _i2.MainNavigator { #style: style, }, ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i1.Route? onGenerateRoute(_i1.RouteSettings? settings) => + (super.noSuchMethod(Invocation.method( + #onGenerateRoute, + [settings], + )) as _i1.Route?); + + @override + void goToHomeScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToHomeScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + void goToSplashScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToSplashScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future goToLicenseScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToLicenseScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToTodoAddScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToTodoAddScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToAnalyticsPermissionScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToAnalyticsPermissionScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + void goToLoginScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToLoginScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future goToThemeModeSelectorScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToThemeModeSelectorScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToDebugPlatformSelectorScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToDebugPlatformSelectorScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToDebugScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToDebugScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + void goBack() => super.noSuchMethod( + Invocation.method( + #goBack, + [], + ), + returnValueForMissingStub: null, + ); + + @override + void goBackWithResult({T? result}) => super.noSuchMethod( + Invocation.method( + #goBackWithResult, + [], + {#result: result}, + ), + returnValueForMissingStub: null, + ); + + @override + void popUntil(bool Function(_i1.Route)? predicate) => + super.noSuchMethod( + Invocation.method( + #popUntil, + [predicate], + ), + returnValueForMissingStub: null, + ); + + @override + void goBackTo(String? routeName) => super.noSuchMethod( + Invocation.method( + #goBackTo, + [routeName], + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future showCustomDialog({_i1.Widget? widget}) => + (super.noSuchMethod( + Invocation.method( + #showCustomDialog, + [], + {#widget: widget}, + ), + returnValue: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future showBottomSheet({_i1.Widget? widget}) => + (super.noSuchMethod( + Invocation.method( + #showBottomSheet, + [], + {#widget: widget}, + ), + returnValue: _i4.Future.value(), + ) as _i4.Future); } diff --git a/test/viewmodel/debug/debug_viewmodel_test.mocks.dart b/test/viewmodel/debug/debug_viewmodel_test.mocks.dart index eb4b846f..8fbfb6d2 100644 --- a/test/viewmodel/debug/debug_viewmodel_test.mocks.dart +++ b/test/viewmodel/debug/debug_viewmodel_test.mocks.dart @@ -3,19 +3,19 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i5; +import 'dart:async' as _i6; -import 'package:drift/drift.dart' as _i3; -import 'package:drift/src/runtime/executor/stream_queries.dart' as _i4; -import 'package:flutter/material.dart' as _i10; +import 'package:drift/drift.dart' as _i4; +import 'package:drift/src/runtime/executor/stream_queries.dart' as _i5; +import 'package:flutter/material.dart' as _i1; import 'package:flutter_template/database/flutter_template_database.dart' - as _i2; -import 'package:flutter_template/model/snackbar/snackbar_data.dart' as _i7; -import 'package:flutter_template/navigator/main_navigator.dart' as _i6; -import 'package:flutter_template/repository/debug/debug_repository.dart' as _i8; + as _i3; +import 'package:flutter_template/model/snackbar/snackbar_data.dart' as _i8; +import 'package:flutter_template/navigator/main_navigator.dart' as _i7; +import 'package:flutter_template/repository/debug/debug_repository.dart' as _i9; import 'package:flutter_template/repository/shared_prefs/local/local_storage.dart' - as _i9; -import 'package:mockito/mockito.dart' as _i1; + as _i10; +import 'package:mockito/mockito.dart' as _i2; import 'package:mockito/src/dummies.dart' as _i11; // ignore_for_file: type=lint @@ -31,9 +31,9 @@ import 'package:mockito/src/dummies.dart' as _i11; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class -class _Fake$DbTodoTableTable_0 extends _i1.SmartFake - implements _i2.$DbTodoTableTable { - _Fake$DbTodoTableTable_0( +class _FakeGlobalKey_0> + extends _i2.SmartFake implements _i1.GlobalKey { + _FakeGlobalKey_0( Object parent, Invocation parentInvocation, ) : super( @@ -42,9 +42,9 @@ class _Fake$DbTodoTableTable_0 extends _i1.SmartFake ); } -class _FakeGeneratedDatabase_1 extends _i1.SmartFake - implements _i3.GeneratedDatabase { - _FakeGeneratedDatabase_1( +class _Fake$DbTodoTableTable_1 extends _i2.SmartFake + implements _i3.$DbTodoTableTable { + _Fake$DbTodoTableTable_1( Object parent, Invocation parentInvocation, ) : super( @@ -53,9 +53,9 @@ class _FakeGeneratedDatabase_1 extends _i1.SmartFake ); } -class _FakeDriftDatabaseOptions_2 extends _i1.SmartFake - implements _i3.DriftDatabaseOptions { - _FakeDriftDatabaseOptions_2( +class _FakeGeneratedDatabase_2 extends _i2.SmartFake + implements _i4.GeneratedDatabase { + _FakeGeneratedDatabase_2( Object parent, Invocation parentInvocation, ) : super( @@ -64,9 +64,9 @@ class _FakeDriftDatabaseOptions_2 extends _i1.SmartFake ); } -class _FakeMigrationStrategy_3 extends _i1.SmartFake - implements _i3.MigrationStrategy { - _FakeMigrationStrategy_3( +class _FakeDriftDatabaseOptions_3 extends _i2.SmartFake + implements _i4.DriftDatabaseOptions { + _FakeDriftDatabaseOptions_3( Object parent, Invocation parentInvocation, ) : super( @@ -75,9 +75,9 @@ class _FakeMigrationStrategy_3 extends _i1.SmartFake ); } -class _FakeStreamQueryUpdateRules_4 extends _i1.SmartFake - implements _i3.StreamQueryUpdateRules { - _FakeStreamQueryUpdateRules_4( +class _FakeMigrationStrategy_4 extends _i2.SmartFake + implements _i4.MigrationStrategy { + _FakeMigrationStrategy_4( Object parent, Invocation parentInvocation, ) : super( @@ -86,9 +86,9 @@ class _FakeStreamQueryUpdateRules_4 extends _i1.SmartFake ); } -class _FakeDatabaseConnection_5 extends _i1.SmartFake - implements _i3.DatabaseConnection { - _FakeDatabaseConnection_5( +class _FakeStreamQueryUpdateRules_5 extends _i2.SmartFake + implements _i4.StreamQueryUpdateRules { + _FakeStreamQueryUpdateRules_5( Object parent, Invocation parentInvocation, ) : super( @@ -97,8 +97,9 @@ class _FakeDatabaseConnection_5 extends _i1.SmartFake ); } -class _FakeQueryExecutor_6 extends _i1.SmartFake implements _i3.QueryExecutor { - _FakeQueryExecutor_6( +class _FakeDatabaseConnection_6 extends _i2.SmartFake + implements _i4.DatabaseConnection { + _FakeDatabaseConnection_6( Object parent, Invocation parentInvocation, ) : super( @@ -107,9 +108,8 @@ class _FakeQueryExecutor_6 extends _i1.SmartFake implements _i3.QueryExecutor { ); } -class _FakeStreamQueryStore_7 extends _i1.SmartFake - implements _i4.StreamQueryStore { - _FakeStreamQueryStore_7( +class _FakeQueryExecutor_7 extends _i2.SmartFake implements _i4.QueryExecutor { + _FakeQueryExecutor_7( Object parent, Invocation parentInvocation, ) : super( @@ -118,9 +118,9 @@ class _FakeStreamQueryStore_7 extends _i1.SmartFake ); } -class _FakeDatabaseConnectionUser_8 extends _i1.SmartFake - implements _i3.DatabaseConnectionUser { - _FakeDatabaseConnectionUser_8( +class _FakeStreamQueryStore_8 extends _i2.SmartFake + implements _i5.StreamQueryStore { + _FakeStreamQueryStore_8( Object parent, Invocation parentInvocation, ) : super( @@ -129,8 +129,9 @@ class _FakeDatabaseConnectionUser_8 extends _i1.SmartFake ); } -class _FakeMigrator_9 extends _i1.SmartFake implements _i3.Migrator { - _FakeMigrator_9( +class _FakeDatabaseConnectionUser_9 extends _i2.SmartFake + implements _i4.DatabaseConnectionUser { + _FakeDatabaseConnectionUser_9( Object parent, Invocation parentInvocation, ) : super( @@ -139,8 +140,8 @@ class _FakeMigrator_9 extends _i1.SmartFake implements _i3.Migrator { ); } -class _FakeFuture_10 extends _i1.SmartFake implements _i5.Future { - _FakeFuture_10( +class _FakeMigrator_10 extends _i2.SmartFake implements _i4.Migrator { + _FakeMigrator_10( Object parent, Invocation parentInvocation, ) : super( @@ -149,9 +150,8 @@ class _FakeFuture_10 extends _i1.SmartFake implements _i5.Future { ); } -class _FakeInsertStatement_11 extends _i1.SmartFake - implements _i3.InsertStatement { - _FakeInsertStatement_11( +class _FakeFuture_11 extends _i2.SmartFake implements _i6.Future { + _FakeFuture_11( Object parent, Invocation parentInvocation, ) : super( @@ -160,9 +160,9 @@ class _FakeInsertStatement_11 extends _i1.SmartFake ); } -class _FakeUpdateStatement_12 extends _i1.SmartFake - implements _i3.UpdateStatement { - _FakeUpdateStatement_12( +class _FakeInsertStatement_12 extends _i2.SmartFake + implements _i4.InsertStatement { + _FakeInsertStatement_12( Object parent, Invocation parentInvocation, ) : super( @@ -171,9 +171,9 @@ class _FakeUpdateStatement_12 extends _i1.SmartFake ); } -class _FakeSimpleSelectStatement_13 - extends _i1.SmartFake implements _i3.SimpleSelectStatement { - _FakeSimpleSelectStatement_13( +class _FakeUpdateStatement_13 extends _i2.SmartFake + implements _i4.UpdateStatement { + _FakeUpdateStatement_13( Object parent, Invocation parentInvocation, ) : super( @@ -182,9 +182,9 @@ class _FakeSimpleSelectStatement_13 ); } -class _FakeJoinedSelectStatement_14 - extends _i1.SmartFake implements _i3.JoinedSelectStatement { - _FakeJoinedSelectStatement_14( +class _FakeSimpleSelectStatement_14 + extends _i2.SmartFake implements _i4.SimpleSelectStatement { + _FakeSimpleSelectStatement_14( Object parent, Invocation parentInvocation, ) : super( @@ -193,9 +193,9 @@ class _FakeJoinedSelectStatement_14 ); } -class _FakeDeleteStatement_15 extends _i1.SmartFake - implements _i3.DeleteStatement { - _FakeDeleteStatement_15( +class _FakeJoinedSelectStatement_15 + extends _i2.SmartFake implements _i4.JoinedSelectStatement { + _FakeJoinedSelectStatement_15( Object parent, Invocation parentInvocation, ) : super( @@ -204,8 +204,9 @@ class _FakeDeleteStatement_15 extends _i1.SmartFake ); } -class _FakeSelectable_16 extends _i1.SmartFake implements _i3.Selectable { - _FakeSelectable_16( +class _FakeDeleteStatement_16 extends _i2.SmartFake + implements _i4.DeleteStatement { + _FakeDeleteStatement_16( Object parent, Invocation parentInvocation, ) : super( @@ -214,9 +215,19 @@ class _FakeSelectable_16 extends _i1.SmartFake implements _i3.Selectable { ); } -class _FakeGenerationContext_17 extends _i1.SmartFake - implements _i3.GenerationContext { - _FakeGenerationContext_17( +class _FakeSelectable_17 extends _i2.SmartFake implements _i4.Selectable { + _FakeSelectable_17( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGenerationContext_18 extends _i2.SmartFake + implements _i4.GenerationContext { + _FakeGenerationContext_18( Object parent, Invocation parentInvocation, ) : super( @@ -228,21 +239,30 @@ class _FakeGenerationContext_17 extends _i1.SmartFake /// A class which mocks [MainNavigator]. /// /// See the documentation for Mockito's code generation for more information. -class MockMainNavigator extends _i1.Mock implements _i6.MainNavigator { +class MockMainNavigator extends _i2.Mock implements _i7.MainNavigator { MockMainNavigator() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } @override - _i5.Future goToDatabase(_i3.GeneratedDatabase? db) => + _i1.GlobalKey<_i1.NavigatorState> get navigatorKey => (super.noSuchMethod( + Invocation.getter(#navigatorKey), + returnValue: _FakeGlobalKey_0<_i1.NavigatorState>( + this, + Invocation.getter(#navigatorKey), + ), + ) as _i1.GlobalKey<_i1.NavigatorState>); + + @override + _i6.Future goToDatabase(_i4.GeneratedDatabase? db) => (super.noSuchMethod( Invocation.method( #goToDatabase, [db], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override void showErrorWithLocaleKey({ @@ -273,10 +293,10 @@ class MockMainNavigator extends _i1.Mock implements _i6.MainNavigator { ); @override - _i5.Future showCustomSnackBar({ + _i6.Future showCustomSnackBar({ required String? message, String? title, - _i7.SnackBarStyle? style = _i7.SnackBarStyle.neutral, + _i8.SnackBarStyle? style = _i8.SnackBarStyle.neutral, }) => (super.noSuchMethod( Invocation.method( @@ -288,30 +308,196 @@ class MockMainNavigator extends _i1.Mock implements _i6.MainNavigator { #style: style, }, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + + @override + _i1.Route? onGenerateRoute(_i1.RouteSettings? settings) => + (super.noSuchMethod(Invocation.method( + #onGenerateRoute, + [settings], + )) as _i1.Route?); + + @override + void goToHomeScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToHomeScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + void goToSplashScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToSplashScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + _i6.Future goToLicenseScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToLicenseScreen, + [], + {#key: key}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + + @override + _i6.Future goToTodoAddScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToTodoAddScreen, + [], + {#key: key}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + + @override + _i6.Future goToAnalyticsPermissionScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToAnalyticsPermissionScreen, + [], + {#key: key}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + + @override + void goToLoginScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToLoginScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + _i6.Future goToThemeModeSelectorScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToThemeModeSelectorScreen, + [], + {#key: key}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + + @override + _i6.Future goToDebugPlatformSelectorScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToDebugPlatformSelectorScreen, + [], + {#key: key}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + + @override + _i6.Future goToDebugScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToDebugScreen, + [], + {#key: key}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + + @override + void goBack() => super.noSuchMethod( + Invocation.method( + #goBack, + [], + ), + returnValueForMissingStub: null, + ); + + @override + void goBackWithResult({T? result}) => super.noSuchMethod( + Invocation.method( + #goBackWithResult, + [], + {#result: result}, + ), + returnValueForMissingStub: null, + ); + + @override + void popUntil(bool Function(_i1.Route)? predicate) => + super.noSuchMethod( + Invocation.method( + #popUntil, + [predicate], + ), + returnValueForMissingStub: null, + ); + + @override + void goBackTo(String? routeName) => super.noSuchMethod( + Invocation.method( + #goBackTo, + [routeName], + ), + returnValueForMissingStub: null, + ); + + @override + _i6.Future showCustomDialog({_i1.Widget? widget}) => + (super.noSuchMethod( + Invocation.method( + #showCustomDialog, + [], + {#widget: widget}, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + + @override + _i6.Future showBottomSheet({_i1.Widget? widget}) => + (super.noSuchMethod( + Invocation.method( + #showBottomSheet, + [], + {#widget: widget}, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); } /// A class which mocks [DebugRepository]. /// /// See the documentation for Mockito's code generation for more information. -class MockDebugRepository extends _i1.Mock implements _i8.DebugRepository { +class MockDebugRepository extends _i2.Mock implements _i9.DebugRepository { MockDebugRepository() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } @override - _i5.Future saveSlowAnimations({required bool? enabled}) => + _i6.Future saveSlowAnimations({required bool? enabled}) => (super.noSuchMethod( Invocation.method( #saveSlowAnimations, [], {#enabled: enabled}, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override bool isSlowAnimationsEnabled() => (super.noSuchMethod( @@ -323,65 +509,65 @@ class MockDebugRepository extends _i1.Mock implements _i8.DebugRepository { ) as bool); @override - _i5.Future saveSelectedPlatform(String? selectedPlatform) => + _i6.Future saveSelectedPlatform(String? selectedPlatform) => (super.noSuchMethod( Invocation.method( #saveSelectedPlatform, [selectedPlatform], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); } /// A class which mocks [LocalStorage]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocalStorage extends _i1.Mock implements _i9.LocalStorage { +class MockLocalStorage extends _i2.Mock implements _i10.LocalStorage { MockLocalStorage() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } @override - _i5.Future checkForNewInstallation() => (super.noSuchMethod( + _i6.Future checkForNewInstallation() => (super.noSuchMethod( Invocation.method( #checkForNewInstallation, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future updateThemeMode(_i10.ThemeMode? themeMode) => + _i6.Future updateThemeMode(_i1.ThemeMode? themeMode) => (super.noSuchMethod( Invocation.method( #updateThemeMode, [themeMode], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future updateHasAnalyticsPermission(bool? permissionGranted) => + _i6.Future updateHasAnalyticsPermission(bool? permissionGranted) => (super.noSuchMethod( Invocation.method( #updateHasAnalyticsPermission, [permissionGranted], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); } /// A class which mocks [FlutterTemplateDatabase]. /// /// See the documentation for Mockito's code generation for more information. -class MockFlutterTemplateDatabase extends _i1.Mock - implements _i2.FlutterTemplateDatabase { +class MockFlutterTemplateDatabase extends _i2.Mock + implements _i3.FlutterTemplateDatabase { MockFlutterTemplateDatabase() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } @override @@ -391,141 +577,141 @@ class MockFlutterTemplateDatabase extends _i1.Mock ) as int); @override - _i2.$DbTodoTableTable get dbTodoTable => (super.noSuchMethod( + _i3.$DbTodoTableTable get dbTodoTable => (super.noSuchMethod( Invocation.getter(#dbTodoTable), - returnValue: _Fake$DbTodoTableTable_0( + returnValue: _Fake$DbTodoTableTable_1( this, Invocation.getter(#dbTodoTable), ), - ) as _i2.$DbTodoTableTable); + ) as _i3.$DbTodoTableTable); @override get managers => throw UnsupportedError( r'"managers" cannot be used without a mockito fallback generator.'); @override - Iterable<_i3.TableInfo<_i3.Table, Object?>> get allTables => + Iterable<_i4.TableInfo<_i4.Table, Object?>> get allTables => (super.noSuchMethod( Invocation.getter(#allTables), - returnValue: <_i3.TableInfo<_i3.Table, Object?>>[], - ) as Iterable<_i3.TableInfo<_i3.Table, Object?>>); + returnValue: <_i4.TableInfo<_i4.Table, Object?>>[], + ) as Iterable<_i4.TableInfo<_i4.Table, Object?>>); @override - List<_i3.DatabaseSchemaEntity> get allSchemaEntities => (super.noSuchMethod( + List<_i4.DatabaseSchemaEntity> get allSchemaEntities => (super.noSuchMethod( Invocation.getter(#allSchemaEntities), - returnValue: <_i3.DatabaseSchemaEntity>[], - ) as List<_i3.DatabaseSchemaEntity>); + returnValue: <_i4.DatabaseSchemaEntity>[], + ) as List<_i4.DatabaseSchemaEntity>); @override - _i3.GeneratedDatabase get attachedDatabase => (super.noSuchMethod( + _i4.GeneratedDatabase get attachedDatabase => (super.noSuchMethod( Invocation.getter(#attachedDatabase), - returnValue: _FakeGeneratedDatabase_1( + returnValue: _FakeGeneratedDatabase_2( this, Invocation.getter(#attachedDatabase), ), - ) as _i3.GeneratedDatabase); + ) as _i4.GeneratedDatabase); @override - _i3.DriftDatabaseOptions get options => (super.noSuchMethod( + _i4.DriftDatabaseOptions get options => (super.noSuchMethod( Invocation.getter(#options), - returnValue: _FakeDriftDatabaseOptions_2( + returnValue: _FakeDriftDatabaseOptions_3( this, Invocation.getter(#options), ), - ) as _i3.DriftDatabaseOptions); + ) as _i4.DriftDatabaseOptions); @override - _i3.MigrationStrategy get migration => (super.noSuchMethod( + _i4.MigrationStrategy get migration => (super.noSuchMethod( Invocation.getter(#migration), - returnValue: _FakeMigrationStrategy_3( + returnValue: _FakeMigrationStrategy_4( this, Invocation.getter(#migration), ), - ) as _i3.MigrationStrategy); + ) as _i4.MigrationStrategy); @override - _i3.StreamQueryUpdateRules get streamUpdateRules => (super.noSuchMethod( + _i4.StreamQueryUpdateRules get streamUpdateRules => (super.noSuchMethod( Invocation.getter(#streamUpdateRules), - returnValue: _FakeStreamQueryUpdateRules_4( + returnValue: _FakeStreamQueryUpdateRules_5( this, Invocation.getter(#streamUpdateRules), ), - ) as _i3.StreamQueryUpdateRules); + ) as _i4.StreamQueryUpdateRules); @override - _i3.DatabaseConnection get connection => (super.noSuchMethod( + _i4.DatabaseConnection get connection => (super.noSuchMethod( Invocation.getter(#connection), - returnValue: _FakeDatabaseConnection_5( + returnValue: _FakeDatabaseConnection_6( this, Invocation.getter(#connection), ), - ) as _i3.DatabaseConnection); + ) as _i4.DatabaseConnection); @override - _i3.SqlTypes get typeMapping => (super.noSuchMethod( + _i4.SqlTypes get typeMapping => (super.noSuchMethod( Invocation.getter(#typeMapping), - returnValue: _i11.dummyValue<_i3.SqlTypes>( + returnValue: _i11.dummyValue<_i4.SqlTypes>( this, Invocation.getter(#typeMapping), ), - ) as _i3.SqlTypes); + ) as _i4.SqlTypes); @override - _i3.QueryExecutor get executor => (super.noSuchMethod( + _i4.QueryExecutor get executor => (super.noSuchMethod( Invocation.getter(#executor), - returnValue: _FakeQueryExecutor_6( + returnValue: _FakeQueryExecutor_7( this, Invocation.getter(#executor), ), - ) as _i3.QueryExecutor); + ) as _i4.QueryExecutor); @override - _i4.StreamQueryStore get streamQueries => (super.noSuchMethod( + _i5.StreamQueryStore get streamQueries => (super.noSuchMethod( Invocation.getter(#streamQueries), - returnValue: _FakeStreamQueryStore_7( + returnValue: _FakeStreamQueryStore_8( this, Invocation.getter(#streamQueries), ), - ) as _i4.StreamQueryStore); + ) as _i5.StreamQueryStore); @override - _i3.DatabaseConnectionUser get resolvedEngine => (super.noSuchMethod( + _i4.DatabaseConnectionUser get resolvedEngine => (super.noSuchMethod( Invocation.getter(#resolvedEngine), - returnValue: _FakeDatabaseConnectionUser_8( + returnValue: _FakeDatabaseConnectionUser_9( this, Invocation.getter(#resolvedEngine), ), - ) as _i3.DatabaseConnectionUser); + ) as _i4.DatabaseConnectionUser); @override - _i5.Future deleteAllData() => (super.noSuchMethod( + _i6.Future deleteAllData() => (super.noSuchMethod( Invocation.method( #deleteAllData, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i3.Migrator createMigrator() => (super.noSuchMethod( + _i4.Migrator createMigrator() => (super.noSuchMethod( Invocation.method( #createMigrator, [], ), - returnValue: _FakeMigrator_9( + returnValue: _FakeMigrator_10( this, Invocation.method( #createMigrator, [], ), ), - ) as _i3.Migrator); + ) as _i4.Migrator); @override - _i5.Future beforeOpen( - _i3.QueryExecutor? executor, - _i3.OpeningDetails? details, + _i6.Future beforeOpen( + _i4.QueryExecutor? executor, + _i4.OpeningDetails? details, ) => (super.noSuchMethod( Invocation.method( @@ -535,34 +721,34 @@ class MockFlutterTemplateDatabase extends _i1.Mock details, ], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future close() => (super.noSuchMethod( + _i6.Future close() => (super.noSuchMethod( Invocation.method( #close, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Stream>> createStream( - _i4.QueryStreamFetcher? stmt) => + _i6.Stream>> createStream( + _i5.QueryStreamFetcher? stmt) => (super.noSuchMethod( Invocation.method( #createStream, [stmt], ), - returnValue: _i5.Stream>>.empty(), - ) as _i5.Stream>>); + returnValue: _i6.Stream>>.empty(), + ) as _i6.Stream>>); @override T alias( - _i3.ResultSetImplementation? table, + _i4.ResultSetImplementation? table, String? alias, ) => (super.noSuchMethod( @@ -586,7 +772,7 @@ class MockFlutterTemplateDatabase extends _i1.Mock ) as T); @override - void markTablesUpdated(Iterable<_i3.TableInfo<_i3.Table, dynamic>>? tables) => + void markTablesUpdated(Iterable<_i4.TableInfo<_i4.Table, dynamic>>? tables) => super.noSuchMethod( Invocation.method( #markTablesUpdated, @@ -596,7 +782,7 @@ class MockFlutterTemplateDatabase extends _i1.Mock ); @override - void notifyUpdates(Set<_i3.TableUpdate>? updates) => super.noSuchMethod( + void notifyUpdates(Set<_i4.TableUpdate>? updates) => super.noSuchMethod( Invocation.method( #notifyUpdates, [updates], @@ -605,19 +791,19 @@ class MockFlutterTemplateDatabase extends _i1.Mock ); @override - _i5.Stream> tableUpdates( - [_i3.TableUpdateQuery? query = const _i3.TableUpdateQuery.any()]) => + _i6.Stream> tableUpdates( + [_i4.TableUpdateQuery? query = const _i4.TableUpdateQuery.any()]) => (super.noSuchMethod( Invocation.method( #tableUpdates, [query], ), - returnValue: _i5.Stream>.empty(), - ) as _i5.Stream>); + returnValue: _i6.Stream>.empty(), + ) as _i6.Stream>); @override - _i5.Future doWhenOpened( - _i5.FutureOr Function(_i3.QueryExecutor)? fn) => + _i6.Future doWhenOpened( + _i6.FutureOr Function(_i4.QueryExecutor)? fn) => (super.noSuchMethod( Invocation.method( #doWhenOpened, @@ -631,54 +817,54 @@ class MockFlutterTemplateDatabase extends _i1.Mock [fn], ), ), - (T v) => _i5.Future.value(v), + (T v) => _i6.Future.value(v), ) ?? - _FakeFuture_10( + _FakeFuture_11( this, Invocation.method( #doWhenOpened, [fn], ), ), - ) as _i5.Future); + ) as _i6.Future); @override - _i3.InsertStatement into( - _i3.TableInfo? table) => + _i4.InsertStatement into( + _i4.TableInfo? table) => (super.noSuchMethod( Invocation.method( #into, [table], ), - returnValue: _FakeInsertStatement_11( + returnValue: _FakeInsertStatement_12( this, Invocation.method( #into, [table], ), ), - ) as _i3.InsertStatement); + ) as _i4.InsertStatement); @override - _i3.UpdateStatement update( - _i3.TableInfo? table) => + _i4.UpdateStatement update( + _i4.TableInfo? table) => (super.noSuchMethod( Invocation.method( #update, [table], ), - returnValue: _FakeUpdateStatement_12( + returnValue: _FakeUpdateStatement_13( this, Invocation.method( #update, [table], ), ), - ) as _i3.UpdateStatement); + ) as _i4.UpdateStatement); @override - _i3.SimpleSelectStatement select( - _i3.ResultSetImplementation? table, { + _i4.SimpleSelectStatement select( + _i4.ResultSetImplementation? table, { bool? distinct = false, }) => (super.noSuchMethod( @@ -687,7 +873,7 @@ class MockFlutterTemplateDatabase extends _i1.Mock [table], {#distinct: distinct}, ), - returnValue: _FakeSimpleSelectStatement_13( + returnValue: _FakeSimpleSelectStatement_14( this, Invocation.method( #select, @@ -695,11 +881,11 @@ class MockFlutterTemplateDatabase extends _i1.Mock {#distinct: distinct}, ), ), - ) as _i3.SimpleSelectStatement); + ) as _i4.SimpleSelectStatement); @override - _i3.JoinedSelectStatement selectOnly( - _i3.ResultSetImplementation? table, { + _i4.JoinedSelectStatement selectOnly( + _i4.ResultSetImplementation? table, { bool? distinct = false, }) => (super.noSuchMethod( @@ -708,7 +894,7 @@ class MockFlutterTemplateDatabase extends _i1.Mock [table], {#distinct: distinct}, ), - returnValue: _FakeJoinedSelectStatement_14( + returnValue: _FakeJoinedSelectStatement_15( this, Invocation.method( #selectOnly, @@ -716,31 +902,31 @@ class MockFlutterTemplateDatabase extends _i1.Mock {#distinct: distinct}, ), ), - ) as _i3.JoinedSelectStatement); + ) as _i4.JoinedSelectStatement); @override - _i3.DeleteStatement delete( - _i3.TableInfo? table) => + _i4.DeleteStatement delete( + _i4.TableInfo? table) => (super.noSuchMethod( Invocation.method( #delete, [table], ), - returnValue: _FakeDeleteStatement_15( + returnValue: _FakeDeleteStatement_16( this, Invocation.method( #delete, [table], ), ), - ) as _i3.DeleteStatement); + ) as _i4.DeleteStatement); @override - _i5.Future customUpdate( + _i6.Future customUpdate( String? query, { - List<_i3.Variable>? variables = const [], - Set<_i3.TableInfo<_i3.Table, dynamic>>? updates, - _i3.UpdateKind? updateKind, + List<_i4.Variable>? variables = const [], + Set<_i4.TableInfo<_i4.Table, dynamic>>? updates, + _i4.UpdateKind? updateKind, }) => (super.noSuchMethod( Invocation.method( @@ -752,14 +938,14 @@ class MockFlutterTemplateDatabase extends _i1.Mock #updateKind: updateKind, }, ), - returnValue: _i5.Future.value(0), - ) as _i5.Future); + returnValue: _i6.Future.value(0), + ) as _i6.Future); @override - _i5.Future customInsert( + _i6.Future customInsert( String? query, { - List<_i3.Variable>? variables = const [], - Set<_i3.TableInfo<_i3.Table, dynamic>>? updates, + List<_i4.Variable>? variables = const [], + Set<_i4.TableInfo<_i4.Table, dynamic>>? updates, }) => (super.noSuchMethod( Invocation.method( @@ -770,15 +956,15 @@ class MockFlutterTemplateDatabase extends _i1.Mock #updates: updates, }, ), - returnValue: _i5.Future.value(0), - ) as _i5.Future); + returnValue: _i6.Future.value(0), + ) as _i6.Future); @override - _i5.Future> customWriteReturning( + _i6.Future> customWriteReturning( String? query, { - List<_i3.Variable>? variables = const [], - Set<_i3.TableInfo<_i3.Table, dynamic>>? updates, - _i3.UpdateKind? updateKind, + List<_i4.Variable>? variables = const [], + Set<_i4.TableInfo<_i4.Table, dynamic>>? updates, + _i4.UpdateKind? updateKind, }) => (super.noSuchMethod( Invocation.method( @@ -790,14 +976,14 @@ class MockFlutterTemplateDatabase extends _i1.Mock #updateKind: updateKind, }, ), - returnValue: _i5.Future>.value(<_i3.QueryRow>[]), - ) as _i5.Future>); + returnValue: _i6.Future>.value(<_i4.QueryRow>[]), + ) as _i6.Future>); @override - _i3.Selectable<_i3.QueryRow> customSelect( + _i4.Selectable<_i4.QueryRow> customSelect( String? query, { - List<_i3.Variable>? variables = const [], - Set<_i3.ResultSetImplementation>? readsFrom = const {}, + List<_i4.Variable>? variables = const [], + Set<_i4.ResultSetImplementation>? readsFrom = const {}, }) => (super.noSuchMethod( Invocation.method( @@ -808,7 +994,7 @@ class MockFlutterTemplateDatabase extends _i1.Mock #readsFrom: readsFrom, }, ), - returnValue: _FakeSelectable_16<_i3.QueryRow>( + returnValue: _FakeSelectable_17<_i4.QueryRow>( this, Invocation.method( #customSelect, @@ -819,13 +1005,13 @@ class MockFlutterTemplateDatabase extends _i1.Mock }, ), ), - ) as _i3.Selectable<_i3.QueryRow>); + ) as _i4.Selectable<_i4.QueryRow>); @override - _i3.Selectable<_i3.QueryRow> customSelectQuery( + _i4.Selectable<_i4.QueryRow> customSelectQuery( String? query, { - List<_i3.Variable>? variables = const [], - Set<_i3.ResultSetImplementation>? readsFrom = const {}, + List<_i4.Variable>? variables = const [], + Set<_i4.ResultSetImplementation>? readsFrom = const {}, }) => (super.noSuchMethod( Invocation.method( @@ -836,7 +1022,7 @@ class MockFlutterTemplateDatabase extends _i1.Mock #readsFrom: readsFrom, }, ), - returnValue: _FakeSelectable_16<_i3.QueryRow>( + returnValue: _FakeSelectable_17<_i4.QueryRow>( this, Invocation.method( #customSelectQuery, @@ -847,10 +1033,10 @@ class MockFlutterTemplateDatabase extends _i1.Mock }, ), ), - ) as _i3.Selectable<_i3.QueryRow>); + ) as _i4.Selectable<_i4.QueryRow>); @override - _i5.Future customStatement( + _i6.Future customStatement( String? statement, [ List? args, ]) => @@ -862,13 +1048,13 @@ class MockFlutterTemplateDatabase extends _i1.Mock args, ], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future transaction( - _i5.Future Function()? action, { + _i6.Future transaction( + _i6.Future Function()? action, { bool? requireNew = false, }) => (super.noSuchMethod( @@ -886,9 +1072,9 @@ class MockFlutterTemplateDatabase extends _i1.Mock {#requireNew: requireNew}, ), ), - (T v) => _i5.Future.value(v), + (T v) => _i6.Future.value(v), ) ?? - _FakeFuture_10( + _FakeFuture_11( this, Invocation.method( #transaction, @@ -896,22 +1082,22 @@ class MockFlutterTemplateDatabase extends _i1.Mock {#requireNew: requireNew}, ), ), - ) as _i5.Future); + ) as _i6.Future); @override - _i5.Future batch(_i5.FutureOr Function(_i3.Batch)? runInBatch) => + _i6.Future batch(_i6.FutureOr Function(_i4.Batch)? runInBatch) => (super.noSuchMethod( Invocation.method( #batch, [runInBatch], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i3.GenerationContext $write( - _i3.Component? component, { + _i4.GenerationContext $write( + _i4.Component? component, { bool? hasMultipleTables, int? startIndex, }) => @@ -924,7 +1110,7 @@ class MockFlutterTemplateDatabase extends _i1.Mock #startIndex: startIndex, }, ), - returnValue: _FakeGenerationContext_17( + returnValue: _FakeGenerationContext_18( this, Invocation.method( #$write, @@ -935,12 +1121,12 @@ class MockFlutterTemplateDatabase extends _i1.Mock }, ), ), - ) as _i3.GenerationContext); + ) as _i4.GenerationContext); @override - _i3.GenerationContext $writeInsertable( - _i3.TableInfo<_i3.Table, dynamic>? table, - _i3.Insertable? insertable, { + _i4.GenerationContext $writeInsertable( + _i4.TableInfo<_i4.Table, dynamic>? table, + _i4.Insertable? insertable, { int? startIndex, }) => (super.noSuchMethod( @@ -952,7 +1138,7 @@ class MockFlutterTemplateDatabase extends _i1.Mock ], {#startIndex: startIndex}, ), - returnValue: _FakeGenerationContext_17( + returnValue: _FakeGenerationContext_18( this, Invocation.method( #$writeInsertable, @@ -963,7 +1149,7 @@ class MockFlutterTemplateDatabase extends _i1.Mock {#startIndex: startIndex}, ), ), - ) as _i3.GenerationContext); + ) as _i4.GenerationContext); @override String $expandVar( diff --git a/test/viewmodel/license/license_viewmodel_test.mocks.dart b/test/viewmodel/license/license_viewmodel_test.mocks.dart index 49391d69..d9388163 100644 --- a/test/viewmodel/license/license_viewmodel_test.mocks.dart +++ b/test/viewmodel/license/license_viewmodel_test.mocks.dart @@ -3,12 +3,13 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i3; +import 'dart:async' as _i4; -import 'package:drift/drift.dart' as _i4; -import 'package:flutter_template/model/snackbar/snackbar_data.dart' as _i5; -import 'package:flutter_template/navigator/main_navigator.dart' as _i2; -import 'package:mockito/mockito.dart' as _i1; +import 'package:drift/drift.dart' as _i5; +import 'package:flutter/material.dart' as _i1; +import 'package:flutter_template/model/snackbar/snackbar_data.dart' as _i6; +import 'package:flutter_template/navigator/main_navigator.dart' as _i3; +import 'package:mockito/mockito.dart' as _i2; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -23,24 +24,44 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +class _FakeGlobalKey_0> + extends _i2.SmartFake implements _i1.GlobalKey { + _FakeGlobalKey_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [MainNavigator]. /// /// See the documentation for Mockito's code generation for more information. -class MockMainNavigator extends _i1.Mock implements _i2.MainNavigator { +class MockMainNavigator extends _i2.Mock implements _i3.MainNavigator { MockMainNavigator() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } @override - _i3.Future goToDatabase(_i4.GeneratedDatabase? db) => + _i1.GlobalKey<_i1.NavigatorState> get navigatorKey => (super.noSuchMethod( + Invocation.getter(#navigatorKey), + returnValue: _FakeGlobalKey_0<_i1.NavigatorState>( + this, + Invocation.getter(#navigatorKey), + ), + ) as _i1.GlobalKey<_i1.NavigatorState>); + + @override + _i4.Future goToDatabase(_i5.GeneratedDatabase? db) => (super.noSuchMethod( Invocation.method( #goToDatabase, [db], ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override void showErrorWithLocaleKey({ @@ -71,10 +92,10 @@ class MockMainNavigator extends _i1.Mock implements _i2.MainNavigator { ); @override - _i3.Future showCustomSnackBar({ + _i4.Future showCustomSnackBar({ required String? message, String? title, - _i5.SnackBarStyle? style = _i5.SnackBarStyle.neutral, + _i6.SnackBarStyle? style = _i6.SnackBarStyle.neutral, }) => (super.noSuchMethod( Invocation.method( @@ -86,7 +107,173 @@ class MockMainNavigator extends _i1.Mock implements _i2.MainNavigator { #style: style, }, ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i1.Route? onGenerateRoute(_i1.RouteSettings? settings) => + (super.noSuchMethod(Invocation.method( + #onGenerateRoute, + [settings], + )) as _i1.Route?); + + @override + void goToHomeScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToHomeScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + void goToSplashScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToSplashScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future goToLicenseScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToLicenseScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToTodoAddScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToTodoAddScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToAnalyticsPermissionScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToAnalyticsPermissionScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + void goToLoginScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToLoginScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future goToThemeModeSelectorScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToThemeModeSelectorScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToDebugPlatformSelectorScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToDebugPlatformSelectorScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToDebugScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToDebugScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + void goBack() => super.noSuchMethod( + Invocation.method( + #goBack, + [], + ), + returnValueForMissingStub: null, + ); + + @override + void goBackWithResult({T? result}) => super.noSuchMethod( + Invocation.method( + #goBackWithResult, + [], + {#result: result}, + ), + returnValueForMissingStub: null, + ); + + @override + void popUntil(bool Function(_i1.Route)? predicate) => + super.noSuchMethod( + Invocation.method( + #popUntil, + [predicate], + ), + returnValueForMissingStub: null, + ); + + @override + void goBackTo(String? routeName) => super.noSuchMethod( + Invocation.method( + #goBackTo, + [routeName], + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future showCustomDialog({_i1.Widget? widget}) => + (super.noSuchMethod( + Invocation.method( + #showCustomDialog, + [], + {#widget: widget}, + ), + returnValue: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future showBottomSheet({_i1.Widget? widget}) => + (super.noSuchMethod( + Invocation.method( + #showBottomSheet, + [], + {#widget: widget}, + ), + returnValue: _i4.Future.value(), + ) as _i4.Future); } diff --git a/test/viewmodel/login/login_viewmodel_test.mocks.dart b/test/viewmodel/login/login_viewmodel_test.mocks.dart index e9ab3262..080e701b 100644 --- a/test/viewmodel/login/login_viewmodel_test.mocks.dart +++ b/test/viewmodel/login/login_viewmodel_test.mocks.dart @@ -3,14 +3,15 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i3; +import 'dart:async' as _i4; -import 'package:drift/drift.dart' as _i5; -import 'package:flutter_template/model/snackbar/snackbar_data.dart' as _i6; -import 'package:flutter_template/navigator/main_navigator.dart' as _i4; -import 'package:flutter_template/navigator/onboarding_navigator.dart' as _i7; -import 'package:flutter_template/repository/login/login_repository.dart' as _i2; -import 'package:mockito/mockito.dart' as _i1; +import 'package:drift/drift.dart' as _i6; +import 'package:flutter/material.dart' as _i1; +import 'package:flutter_template/model/snackbar/snackbar_data.dart' as _i7; +import 'package:flutter_template/navigator/main_navigator.dart' as _i5; +import 'package:flutter_template/navigator/onboarding_navigator.dart' as _i8; +import 'package:flutter_template/repository/login/login_repository.dart' as _i3; +import 'package:mockito/mockito.dart' as _i2; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -25,28 +26,39 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +class _FakeGlobalKey_0> + extends _i2.SmartFake implements _i1.GlobalKey { + _FakeGlobalKey_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [LoginRepository]. /// /// See the documentation for Mockito's code generation for more information. -class MockLoginRepository extends _i1.Mock implements _i2.LoginRepository { +class MockLoginRepository extends _i2.Mock implements _i3.LoginRepository { MockLoginRepository() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } @override - _i3.Future get isLoggedIn => (super.noSuchMethod( + _i4.Future get isLoggedIn => (super.noSuchMethod( Invocation.getter(#isLoggedIn), - returnValue: _i3.Future.value(false), - ) as _i3.Future); + returnValue: _i4.Future.value(false), + ) as _i4.Future); @override - _i3.Future get isNotLoggedIn => (super.noSuchMethod( + _i4.Future get isNotLoggedIn => (super.noSuchMethod( Invocation.getter(#isNotLoggedIn), - returnValue: _i3.Future.value(false), - ) as _i3.Future); + returnValue: _i4.Future.value(false), + ) as _i4.Future); @override - _i3.Future login({ + _i4.Future login({ required String? email, required String? password, }) => @@ -59,29 +71,38 @@ class MockLoginRepository extends _i1.Mock implements _i2.LoginRepository { #password: password, }, ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); } /// A class which mocks [MainNavigator]. /// /// See the documentation for Mockito's code generation for more information. -class MockMainNavigator extends _i1.Mock implements _i4.MainNavigator { +class MockMainNavigator extends _i2.Mock implements _i5.MainNavigator { MockMainNavigator() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } @override - _i3.Future goToDatabase(_i5.GeneratedDatabase? db) => + _i1.GlobalKey<_i1.NavigatorState> get navigatorKey => (super.noSuchMethod( + Invocation.getter(#navigatorKey), + returnValue: _FakeGlobalKey_0<_i1.NavigatorState>( + this, + Invocation.getter(#navigatorKey), + ), + ) as _i1.GlobalKey<_i1.NavigatorState>); + + @override + _i4.Future goToDatabase(_i6.GeneratedDatabase? db) => (super.noSuchMethod( Invocation.method( #goToDatabase, [db], ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override void showErrorWithLocaleKey({ @@ -112,10 +133,10 @@ class MockMainNavigator extends _i1.Mock implements _i4.MainNavigator { ); @override - _i3.Future showCustomSnackBar({ + _i4.Future showCustomSnackBar({ required String? message, String? title, - _i6.SnackBarStyle? style = _i6.SnackBarStyle.neutral, + _i7.SnackBarStyle? style = _i7.SnackBarStyle.neutral, }) => (super.noSuchMethod( Invocation.method( @@ -127,27 +148,193 @@ class MockMainNavigator extends _i1.Mock implements _i4.MainNavigator { #style: style, }, ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i1.Route? onGenerateRoute(_i1.RouteSettings? settings) => + (super.noSuchMethod(Invocation.method( + #onGenerateRoute, + [settings], + )) as _i1.Route?); + + @override + void goToHomeScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToHomeScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + void goToSplashScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToSplashScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future goToLicenseScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToLicenseScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToTodoAddScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToTodoAddScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToAnalyticsPermissionScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToAnalyticsPermissionScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + void goToLoginScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToLoginScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future goToThemeModeSelectorScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToThemeModeSelectorScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToDebugPlatformSelectorScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToDebugPlatformSelectorScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToDebugScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToDebugScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + void goBack() => super.noSuchMethod( + Invocation.method( + #goBack, + [], + ), + returnValueForMissingStub: null, + ); + + @override + void goBackWithResult({T? result}) => super.noSuchMethod( + Invocation.method( + #goBackWithResult, + [], + {#result: result}, + ), + returnValueForMissingStub: null, + ); + + @override + void popUntil(bool Function(_i1.Route)? predicate) => + super.noSuchMethod( + Invocation.method( + #popUntil, + [predicate], + ), + returnValueForMissingStub: null, + ); + + @override + void goBackTo(String? routeName) => super.noSuchMethod( + Invocation.method( + #goBackTo, + [routeName], + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future showCustomDialog({_i1.Widget? widget}) => + (super.noSuchMethod( + Invocation.method( + #showCustomDialog, + [], + {#widget: widget}, + ), + returnValue: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future showBottomSheet({_i1.Widget? widget}) => + (super.noSuchMethod( + Invocation.method( + #showBottomSheet, + [], + {#widget: widget}, + ), + returnValue: _i4.Future.value(), + ) as _i4.Future); } /// A class which mocks [OnboardingNavigator]. /// /// See the documentation for Mockito's code generation for more information. -class MockOnboardingNavigator extends _i1.Mock - implements _i7.OnboardingNavigator { +class MockOnboardingNavigator extends _i2.Mock + implements _i8.OnboardingNavigator { MockOnboardingNavigator() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } @override - _i3.Future goToNextScreen() => (super.noSuchMethod( + _i4.Future goToNextScreen() => (super.noSuchMethod( Invocation.method( #goToNextScreen, [], ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); } diff --git a/test/viewmodel/theme_selector/theme_selector_viewmodel_test.mocks.dart b/test/viewmodel/theme_selector/theme_selector_viewmodel_test.mocks.dart index bfee41d3..eff9c3bd 100644 --- a/test/viewmodel/theme_selector/theme_selector_viewmodel_test.mocks.dart +++ b/test/viewmodel/theme_selector/theme_selector_viewmodel_test.mocks.dart @@ -4,16 +4,16 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i5; -import 'dart:ui' as _i3; +import 'dart:ui' as _i4; import 'package:drift/drift.dart' as _i10; -import 'package:flutter/material.dart' as _i4; +import 'package:flutter/material.dart' as _i1; import 'package:flutter_template/model/snackbar/snackbar_data.dart' as _i11; import 'package:flutter_template/navigator/main_navigator.dart' as _i9; import 'package:flutter_template/util/locale/localization.dart' as _i7; -import 'package:flutter_template/viewmodel/global/global_viewmodel.dart' as _i2; +import 'package:flutter_template/viewmodel/global/global_viewmodel.dart' as _i3; import 'package:icapps_architecture/icapps_architecture.dart' as _i8; -import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/mockito.dart' as _i2; import 'package:mockito/src/dummies.dart' as _i6; // ignore_for_file: type=lint @@ -29,25 +29,36 @@ import 'package:mockito/src/dummies.dart' as _i6; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +class _FakeGlobalKey_0> + extends _i2.SmartFake implements _i1.GlobalKey { + _FakeGlobalKey_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [GlobalViewModel]. /// /// See the documentation for Mockito's code generation for more information. -class MockGlobalViewModel extends _i1.Mock implements _i2.GlobalViewModel { +class MockGlobalViewModel extends _i2.Mock implements _i3.GlobalViewModel { MockGlobalViewModel() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } @override - List<_i3.Locale> get supportedLocales => (super.noSuchMethod( + List<_i4.Locale> get supportedLocales => (super.noSuchMethod( Invocation.getter(#supportedLocales), - returnValue: <_i3.Locale>[], - ) as List<_i3.Locale>); + returnValue: <_i4.Locale>[], + ) as List<_i4.Locale>); @override - _i4.ThemeMode get themeMode => (super.noSuchMethod( + _i1.ThemeMode get themeMode => (super.noSuchMethod( Invocation.getter(#themeMode), - returnValue: _i4.ThemeMode.system, - ) as _i4.ThemeMode); + returnValue: _i1.ThemeMode.system, + ) as _i1.ThemeMode); @override bool get showsTranslationKeys => (super.noSuchMethod( @@ -78,7 +89,7 @@ class MockGlobalViewModel extends _i1.Mock implements _i2.GlobalViewModel { ) as _i5.Future); @override - _i5.Future updateThemeMode(_i4.ThemeMode? themeMode) => + _i5.Future updateThemeMode(_i1.ThemeMode? themeMode) => (super.noSuchMethod( Invocation.method( #updateThemeMode, @@ -222,7 +233,7 @@ class MockGlobalViewModel extends _i1.Mock implements _i2.GlobalViewModel { ); @override - void addListener(_i3.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i4.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -231,7 +242,7 @@ class MockGlobalViewModel extends _i1.Mock implements _i2.GlobalViewModel { ); @override - void removeListener(_i3.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -271,11 +282,20 @@ class MockGlobalViewModel extends _i1.Mock implements _i2.GlobalViewModel { /// A class which mocks [MainNavigator]. /// /// See the documentation for Mockito's code generation for more information. -class MockMainNavigator extends _i1.Mock implements _i9.MainNavigator { +class MockMainNavigator extends _i2.Mock implements _i9.MainNavigator { MockMainNavigator() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } + @override + _i1.GlobalKey<_i1.NavigatorState> get navigatorKey => (super.noSuchMethod( + Invocation.getter(#navigatorKey), + returnValue: _FakeGlobalKey_0<_i1.NavigatorState>( + this, + Invocation.getter(#navigatorKey), + ), + ) as _i1.GlobalKey<_i1.NavigatorState>); + @override _i5.Future goToDatabase(_i10.GeneratedDatabase? db) => (super.noSuchMethod( @@ -334,4 +354,170 @@ class MockMainNavigator extends _i1.Mock implements _i9.MainNavigator { returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); + + @override + _i1.Route? onGenerateRoute(_i1.RouteSettings? settings) => + (super.noSuchMethod(Invocation.method( + #onGenerateRoute, + [settings], + )) as _i1.Route?); + + @override + void goToHomeScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToHomeScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + void goToSplashScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToSplashScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + _i5.Future goToLicenseScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToLicenseScreen, + [], + {#key: key}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future goToTodoAddScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToTodoAddScreen, + [], + {#key: key}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future goToAnalyticsPermissionScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToAnalyticsPermissionScreen, + [], + {#key: key}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + void goToLoginScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToLoginScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + _i5.Future goToThemeModeSelectorScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToThemeModeSelectorScreen, + [], + {#key: key}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future goToDebugPlatformSelectorScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToDebugPlatformSelectorScreen, + [], + {#key: key}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future goToDebugScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToDebugScreen, + [], + {#key: key}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + void goBack() => super.noSuchMethod( + Invocation.method( + #goBack, + [], + ), + returnValueForMissingStub: null, + ); + + @override + void goBackWithResult({T? result}) => super.noSuchMethod( + Invocation.method( + #goBackWithResult, + [], + {#result: result}, + ), + returnValueForMissingStub: null, + ); + + @override + void popUntil(bool Function(_i1.Route)? predicate) => + super.noSuchMethod( + Invocation.method( + #popUntil, + [predicate], + ), + returnValueForMissingStub: null, + ); + + @override + void goBackTo(String? routeName) => super.noSuchMethod( + Invocation.method( + #goBackTo, + [routeName], + ), + returnValueForMissingStub: null, + ); + + @override + _i5.Future showCustomDialog({_i1.Widget? widget}) => + (super.noSuchMethod( + Invocation.method( + #showCustomDialog, + [], + {#widget: widget}, + ), + returnValue: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future showBottomSheet({_i1.Widget? widget}) => + (super.noSuchMethod( + Invocation.method( + #showBottomSheet, + [], + {#widget: widget}, + ), + returnValue: _i5.Future.value(), + ) as _i5.Future); } diff --git a/test/viewmodel/todo/todo_add/todo_add_viewmodel_test.mocks.dart b/test/viewmodel/todo/todo_add/todo_add_viewmodel_test.mocks.dart index 405fe5bc..d6fea5d6 100644 --- a/test/viewmodel/todo/todo_add/todo_add_viewmodel_test.mocks.dart +++ b/test/viewmodel/todo/todo_add/todo_add_viewmodel_test.mocks.dart @@ -3,14 +3,15 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i3; +import 'dart:async' as _i4; -import 'package:drift/drift.dart' as _i6; -import 'package:flutter_template/model/snackbar/snackbar_data.dart' as _i7; -import 'package:flutter_template/model/webservice/todo/todo.dart' as _i4; -import 'package:flutter_template/navigator/main_navigator.dart' as _i5; -import 'package:flutter_template/repository/todo/todo_repository.dart' as _i2; -import 'package:mockito/mockito.dart' as _i1; +import 'package:drift/drift.dart' as _i7; +import 'package:flutter/material.dart' as _i1; +import 'package:flutter_template/model/snackbar/snackbar_data.dart' as _i8; +import 'package:flutter_template/model/webservice/todo/todo.dart' as _i5; +import 'package:flutter_template/navigator/main_navigator.dart' as _i6; +import 'package:flutter_template/repository/todo/todo_repository.dart' as _i3; +import 'package:mockito/mockito.dart' as _i2; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -25,44 +26,55 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +class _FakeGlobalKey_0> + extends _i2.SmartFake implements _i1.GlobalKey { + _FakeGlobalKey_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [TodoRepository]. /// /// See the documentation for Mockito's code generation for more information. -class MockTodoRepository extends _i1.Mock implements _i2.TodoRepository { +class MockTodoRepository extends _i2.Mock implements _i3.TodoRepository { MockTodoRepository() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } @override - _i3.Stream> getTodos() => (super.noSuchMethod( + _i4.Stream> getTodos() => (super.noSuchMethod( Invocation.method( #getTodos, [], ), - returnValue: _i3.Stream>.empty(), - ) as _i3.Stream>); + returnValue: _i4.Stream>.empty(), + ) as _i4.Stream>); @override - _i3.Future> fetchTodos() => (super.noSuchMethod( + _i4.Future> fetchTodos() => (super.noSuchMethod( Invocation.method( #fetchTodos, [], ), - returnValue: _i3.Future>.value(<_i4.Todo>[]), - ) as _i3.Future>); + returnValue: _i4.Future>.value(<_i5.Todo>[]), + ) as _i4.Future>); @override - _i3.Future saveTodo(String? todo) => (super.noSuchMethod( + _i4.Future saveTodo(String? todo) => (super.noSuchMethod( Invocation.method( #saveTodo, [todo], ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i3.Future setTodoState({ + _i4.Future setTodoState({ required int? id, required bool? value, }) => @@ -75,29 +87,38 @@ class MockTodoRepository extends _i1.Mock implements _i2.TodoRepository { #value: value, }, ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); } /// A class which mocks [MainNavigator]. /// /// See the documentation for Mockito's code generation for more information. -class MockMainNavigator extends _i1.Mock implements _i5.MainNavigator { +class MockMainNavigator extends _i2.Mock implements _i6.MainNavigator { MockMainNavigator() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } @override - _i3.Future goToDatabase(_i6.GeneratedDatabase? db) => + _i1.GlobalKey<_i1.NavigatorState> get navigatorKey => (super.noSuchMethod( + Invocation.getter(#navigatorKey), + returnValue: _FakeGlobalKey_0<_i1.NavigatorState>( + this, + Invocation.getter(#navigatorKey), + ), + ) as _i1.GlobalKey<_i1.NavigatorState>); + + @override + _i4.Future goToDatabase(_i7.GeneratedDatabase? db) => (super.noSuchMethod( Invocation.method( #goToDatabase, [db], ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override void showErrorWithLocaleKey({ @@ -128,10 +149,10 @@ class MockMainNavigator extends _i1.Mock implements _i5.MainNavigator { ); @override - _i3.Future showCustomSnackBar({ + _i4.Future showCustomSnackBar({ required String? message, String? title, - _i7.SnackBarStyle? style = _i7.SnackBarStyle.neutral, + _i8.SnackBarStyle? style = _i8.SnackBarStyle.neutral, }) => (super.noSuchMethod( Invocation.method( @@ -143,7 +164,173 @@ class MockMainNavigator extends _i1.Mock implements _i5.MainNavigator { #style: style, }, ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i1.Route? onGenerateRoute(_i1.RouteSettings? settings) => + (super.noSuchMethod(Invocation.method( + #onGenerateRoute, + [settings], + )) as _i1.Route?); + + @override + void goToHomeScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToHomeScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + void goToSplashScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToSplashScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future goToLicenseScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToLicenseScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToTodoAddScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToTodoAddScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToAnalyticsPermissionScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToAnalyticsPermissionScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + void goToLoginScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToLoginScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future goToThemeModeSelectorScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToThemeModeSelectorScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToDebugPlatformSelectorScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToDebugPlatformSelectorScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToDebugScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToDebugScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + void goBack() => super.noSuchMethod( + Invocation.method( + #goBack, + [], + ), + returnValueForMissingStub: null, + ); + + @override + void goBackWithResult({T? result}) => super.noSuchMethod( + Invocation.method( + #goBackWithResult, + [], + {#result: result}, + ), + returnValueForMissingStub: null, + ); + + @override + void popUntil(bool Function(_i1.Route)? predicate) => + super.noSuchMethod( + Invocation.method( + #popUntil, + [predicate], + ), + returnValueForMissingStub: null, + ); + + @override + void goBackTo(String? routeName) => super.noSuchMethod( + Invocation.method( + #goBackTo, + [routeName], + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future showCustomDialog({_i1.Widget? widget}) => + (super.noSuchMethod( + Invocation.method( + #showCustomDialog, + [], + {#widget: widget}, + ), + returnValue: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future showBottomSheet({_i1.Widget? widget}) => + (super.noSuchMethod( + Invocation.method( + #showBottomSheet, + [], + {#widget: widget}, + ), + returnValue: _i4.Future.value(), + ) as _i4.Future); } diff --git a/test/viewmodel/todo/todo_list/todo_list_viewmodel_test.mocks.dart b/test/viewmodel/todo/todo_list/todo_list_viewmodel_test.mocks.dart index 41f0f995..ed816be2 100644 --- a/test/viewmodel/todo/todo_list/todo_list_viewmodel_test.mocks.dart +++ b/test/viewmodel/todo/todo_list/todo_list_viewmodel_test.mocks.dart @@ -3,14 +3,15 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i3; +import 'dart:async' as _i4; -import 'package:drift/drift.dart' as _i6; -import 'package:flutter_template/model/snackbar/snackbar_data.dart' as _i7; -import 'package:flutter_template/model/webservice/todo/todo.dart' as _i4; -import 'package:flutter_template/navigator/main_navigator.dart' as _i5; -import 'package:flutter_template/repository/todo/todo_repository.dart' as _i2; -import 'package:mockito/mockito.dart' as _i1; +import 'package:drift/drift.dart' as _i7; +import 'package:flutter/material.dart' as _i1; +import 'package:flutter_template/model/snackbar/snackbar_data.dart' as _i8; +import 'package:flutter_template/model/webservice/todo/todo.dart' as _i5; +import 'package:flutter_template/navigator/main_navigator.dart' as _i6; +import 'package:flutter_template/repository/todo/todo_repository.dart' as _i3; +import 'package:mockito/mockito.dart' as _i2; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -25,44 +26,55 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +class _FakeGlobalKey_0> + extends _i2.SmartFake implements _i1.GlobalKey { + _FakeGlobalKey_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [TodoRepository]. /// /// See the documentation for Mockito's code generation for more information. -class MockTodoRepository extends _i1.Mock implements _i2.TodoRepository { +class MockTodoRepository extends _i2.Mock implements _i3.TodoRepository { MockTodoRepository() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } @override - _i3.Stream> getTodos() => (super.noSuchMethod( + _i4.Stream> getTodos() => (super.noSuchMethod( Invocation.method( #getTodos, [], ), - returnValue: _i3.Stream>.empty(), - ) as _i3.Stream>); + returnValue: _i4.Stream>.empty(), + ) as _i4.Stream>); @override - _i3.Future> fetchTodos() => (super.noSuchMethod( + _i4.Future> fetchTodos() => (super.noSuchMethod( Invocation.method( #fetchTodos, [], ), - returnValue: _i3.Future>.value(<_i4.Todo>[]), - ) as _i3.Future>); + returnValue: _i4.Future>.value(<_i5.Todo>[]), + ) as _i4.Future>); @override - _i3.Future saveTodo(String? todo) => (super.noSuchMethod( + _i4.Future saveTodo(String? todo) => (super.noSuchMethod( Invocation.method( #saveTodo, [todo], ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i3.Future setTodoState({ + _i4.Future setTodoState({ required int? id, required bool? value, }) => @@ -75,29 +87,38 @@ class MockTodoRepository extends _i1.Mock implements _i2.TodoRepository { #value: value, }, ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); } /// A class which mocks [MainNavigator]. /// /// See the documentation for Mockito's code generation for more information. -class MockMainNavigator extends _i1.Mock implements _i5.MainNavigator { +class MockMainNavigator extends _i2.Mock implements _i6.MainNavigator { MockMainNavigator() { - _i1.throwOnMissingStub(this); + _i2.throwOnMissingStub(this); } @override - _i3.Future goToDatabase(_i6.GeneratedDatabase? db) => + _i1.GlobalKey<_i1.NavigatorState> get navigatorKey => (super.noSuchMethod( + Invocation.getter(#navigatorKey), + returnValue: _FakeGlobalKey_0<_i1.NavigatorState>( + this, + Invocation.getter(#navigatorKey), + ), + ) as _i1.GlobalKey<_i1.NavigatorState>); + + @override + _i4.Future goToDatabase(_i7.GeneratedDatabase? db) => (super.noSuchMethod( Invocation.method( #goToDatabase, [db], ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override void showErrorWithLocaleKey({ @@ -128,10 +149,10 @@ class MockMainNavigator extends _i1.Mock implements _i5.MainNavigator { ); @override - _i3.Future showCustomSnackBar({ + _i4.Future showCustomSnackBar({ required String? message, String? title, - _i7.SnackBarStyle? style = _i7.SnackBarStyle.neutral, + _i8.SnackBarStyle? style = _i8.SnackBarStyle.neutral, }) => (super.noSuchMethod( Invocation.method( @@ -143,7 +164,173 @@ class MockMainNavigator extends _i1.Mock implements _i5.MainNavigator { #style: style, }, ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i1.Route? onGenerateRoute(_i1.RouteSettings? settings) => + (super.noSuchMethod(Invocation.method( + #onGenerateRoute, + [settings], + )) as _i1.Route?); + + @override + void goToHomeScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToHomeScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + void goToSplashScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToSplashScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future goToLicenseScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToLicenseScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToTodoAddScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToTodoAddScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToAnalyticsPermissionScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToAnalyticsPermissionScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + void goToLoginScreen({_i1.Key? key}) => super.noSuchMethod( + Invocation.method( + #goToLoginScreen, + [], + {#key: key}, + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future goToThemeModeSelectorScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToThemeModeSelectorScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToDebugPlatformSelectorScreen({_i1.Key? key}) => + (super.noSuchMethod( + Invocation.method( + #goToDebugPlatformSelectorScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future goToDebugScreen({_i1.Key? key}) => (super.noSuchMethod( + Invocation.method( + #goToDebugScreen, + [], + {#key: key}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + void goBack() => super.noSuchMethod( + Invocation.method( + #goBack, + [], + ), + returnValueForMissingStub: null, + ); + + @override + void goBackWithResult({T? result}) => super.noSuchMethod( + Invocation.method( + #goBackWithResult, + [], + {#result: result}, + ), + returnValueForMissingStub: null, + ); + + @override + void popUntil(bool Function(_i1.Route)? predicate) => + super.noSuchMethod( + Invocation.method( + #popUntil, + [predicate], + ), + returnValueForMissingStub: null, + ); + + @override + void goBackTo(String? routeName) => super.noSuchMethod( + Invocation.method( + #goBackTo, + [routeName], + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future showCustomDialog({_i1.Widget? widget}) => + (super.noSuchMethod( + Invocation.method( + #showCustomDialog, + [], + {#widget: widget}, + ), + returnValue: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future showBottomSheet({_i1.Widget? widget}) => + (super.noSuchMethod( + Invocation.method( + #showBottomSheet, + [], + {#widget: widget}, + ), + returnValue: _i4.Future.value(), + ) as _i4.Future); }