Skip to content

Commit 0b985e9

Browse files
Switch Dart keys
1 parent 10ef688 commit 0b985e9

10 files changed

Lines changed: 213 additions & 81 deletions

File tree

lib/app/app.locator.dart

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/app/app.router.dart

Lines changed: 111 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/ui/views/bibles/bibles_view.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import 'bibles_viewmodel.dart';
99

1010
class BiblesView extends StackedView<BiblesViewModel> {
1111
const BiblesView({
12-
Key? key,
12+
super.key,
1313
required this.readerArea,
14-
}) : super(key: key);
14+
});
1515

1616
final Area readerArea;
1717

lib/ui/views/navigation_bible_divisions/navigation_bible_divisions_view.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import 'navigation_bible_divisions_viewmodel.dart';
1010

1111
class NavigationBibleDivisionsView extends StackedView<NavigationBibleDivisionsViewModel> {
1212
const NavigationBibleDivisionsView({
13-
Key? key,
13+
super.key,
1414
required this.readerArea,
15-
}) : super(key: key);
15+
});
1616

1717
final Area readerArea;
1818

lib/ui/views/navigation_books/navigation_books_view.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import 'navigation_books_viewmodel.dart';
1111

1212
class NavigationBooksView extends StackedView<NavigationBooksViewModel> {
1313
const NavigationBooksView({
14-
Key? key,
14+
super.key,
1515
required this.readerArea,
1616
required this.bibleDivisionCode,
17-
}) : super(key: key);
17+
});
1818

1919
final Area readerArea;
2020
final String bibleDivisionCode;

lib/ui/views/navigation_sections_chapters/navigation_sections_chapters_view.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import 'navigation_sections_chapters_viewmodel.dart';
1111

1212
class NavigationSectionsChaptersView extends StackedView<NavigationSectionsChaptersViewModel> {
1313
const NavigationSectionsChaptersView({
14-
Key? key,
14+
super.key,
1515
required this.readerArea,
1616
required this.bookCode,
17-
}) : super(key: key);
17+
});
1818

1919
final Area readerArea;
2020
final String bookCode;

lib/ui/views/reader/reader_view.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import 'widgets/secondary_reader_appbar/secondary_reader_appbar.dart';
1616
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
1717

1818
class ReaderView extends StackedView<ReaderViewModel> {
19-
const ReaderView({Key? key}) : super(key: key);
19+
const ReaderView({super.key});
2020

2121
@override
2222
void onViewModelReady(ReaderViewModel viewModel) {

lib/ui/views/search/search_view.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import '../../common/ui_helpers.dart';
66
import 'search_viewmodel.dart';
77

88
class SearchView extends StackedView<SearchViewModel> {
9-
const SearchView({Key? key}) : super(key: key);
9+
const SearchView({super.key});
1010

1111
@override
1212
Widget builder(

lib/ui/views/startup/startup_view.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import 'package:stacked/stacked.dart';
55
import 'startup_viewmodel.dart';
66

77
class StartupView extends StackedView<StartupViewModel> {
8-
const StartupView({Key? key}) : super(key: key);
8+
const StartupView({super.key});
99

1010
@override
1111
Widget builder(

test/helpers/test_helpers.mocks.dart

Lines changed: 89 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ class MockNavigationService extends _i1.Mock implements _i2.NavigationService {
6161
) as String);
6262

6363
@override
64-
_i4.GlobalKey<_i4.NavigatorState>? nestedNavigationKey(int? index) => (super.noSuchMethod(
64+
_i4.GlobalKey<_i4.NavigatorState>? nestedNavigationKey(int? index) =>
65+
(super.noSuchMethod(
6566
Invocation.method(
6667
#nestedNavigationKey,
6768
[index],
@@ -393,9 +394,11 @@ class MockNavigationService extends _i1.Mock implements _i2.NavigationService {
393394
/// A class which mocks [BottomSheetService].
394395
///
395396
/// See the documentation for Mockito's code generation for more information.
396-
class MockBottomSheetService extends _i1.Mock implements _i2.BottomSheetService {
397+
class MockBottomSheetService extends _i1.Mock
398+
implements _i2.BottomSheetService {
397399
@override
398-
void setCustomSheetBuilders(Map<dynamic, _i2.SheetBuilder>? builders) => super.noSuchMethod(
400+
void setCustomSheetBuilders(Map<dynamic, _i2.SheetBuilder>? builders) =>
401+
super.noSuchMethod(
399402
Invocation.method(
400403
#setCustomSheetBuilders,
401404
[builders],
@@ -438,7 +441,8 @@ class MockBottomSheetService extends _i1.Mock implements _i2.BottomSheetService
438441
},
439442
),
440443
returnValue: _i5.Future<_i2.SheetResponse<dynamic>?>.value(),
441-
returnValueForMissingStub: _i5.Future<_i2.SheetResponse<dynamic>?>.value(),
444+
returnValueForMissingStub:
445+
_i5.Future<_i2.SheetResponse<dynamic>?>.value(),
442446
) as _i5.Future<_i2.SheetResponse<dynamic>?>);
443447

444448
@override
@@ -504,7 +508,8 @@ class MockBottomSheetService extends _i1.Mock implements _i2.BottomSheetService
504508
) as _i5.Future<_i2.SheetResponse<T>?>);
505509

506510
@override
507-
void completeSheet(_i2.SheetResponse<dynamic>? response) => super.noSuchMethod(
511+
void completeSheet(_i2.SheetResponse<dynamic>? response) =>
512+
super.noSuchMethod(
508513
Invocation.method(
509514
#completeSheet,
510515
[response],
@@ -518,7 +523,9 @@ class MockBottomSheetService extends _i1.Mock implements _i2.BottomSheetService
518523
/// See the documentation for Mockito's code generation for more information.
519524
class MockDialogService extends _i1.Mock implements _i2.DialogService {
520525
@override
521-
void registerCustomDialogBuilders(Map<dynamic, _i2.DialogBuilder>? builders) => super.noSuchMethod(
526+
void registerCustomDialogBuilders(
527+
Map<dynamic, _i2.DialogBuilder>? builders) =>
528+
super.noSuchMethod(
522529
Invocation.method(
523530
#registerCustomDialogBuilders,
524531
[builders],
@@ -574,7 +581,8 @@ class MockDialogService extends _i1.Mock implements _i2.DialogService {
574581
},
575582
),
576583
returnValue: _i5.Future<_i2.DialogResponse<dynamic>?>.value(),
577-
returnValueForMissingStub: _i5.Future<_i2.DialogResponse<dynamic>?>.value(),
584+
returnValueForMissingStub:
585+
_i5.Future<_i2.DialogResponse<dynamic>?>.value(),
578586
) as _i5.Future<_i2.DialogResponse<dynamic>?>);
579587

580588
@override
@@ -654,11 +662,13 @@ class MockDialogService extends _i1.Mock implements _i2.DialogService {
654662
},
655663
),
656664
returnValue: _i5.Future<_i2.DialogResponse<dynamic>?>.value(),
657-
returnValueForMissingStub: _i5.Future<_i2.DialogResponse<dynamic>?>.value(),
665+
returnValueForMissingStub:
666+
_i5.Future<_i2.DialogResponse<dynamic>?>.value(),
658667
) as _i5.Future<_i2.DialogResponse<dynamic>?>);
659668

660669
@override
661-
void completeDialog(_i2.DialogResponse<dynamic>? response) => super.noSuchMethod(
670+
void completeDialog(_i2.DialogResponse<dynamic>? response) =>
671+
super.noSuchMethod(
662672
Invocation.method(
663673
#completeDialog,
664674
[response],
@@ -679,7 +689,8 @@ class MockBiblesService extends _i1.Mock implements _i7.BiblesService {
679689
) as Map<String, dynamic>);
680690

681691
@override
682-
set primaryAreaJson(Map<String, dynamic>? _primaryAreaJson) => super.noSuchMethod(
692+
set primaryAreaJson(Map<String, dynamic>? _primaryAreaJson) =>
693+
super.noSuchMethod(
683694
Invocation.setter(
684695
#primaryAreaJson,
685696
_primaryAreaJson,
@@ -695,7 +706,8 @@ class MockBiblesService extends _i1.Mock implements _i7.BiblesService {
695706
) as Map<String, dynamic>);
696707

697708
@override
698-
set secondaryAreaJson(Map<String, dynamic>? _secondaryAreaJson) => super.noSuchMethod(
709+
set secondaryAreaJson(Map<String, dynamic>? _secondaryAreaJson) =>
710+
super.noSuchMethod(
699711
Invocation.setter(
700712
#secondaryAreaJson,
701713
_secondaryAreaJson,
@@ -861,6 +873,24 @@ class MockBiblesService extends _i1.Mock implements _i7.BiblesService {
861873
returnValueForMissingStub: _i5.Future<void>.value(),
862874
) as _i5.Future<void>);
863875

876+
@override
877+
void revertToKJVIfOETBookNotAvailable(
878+
String? thebibleCode,
879+
String? theBookCode,
880+
_i8.Area? area,
881+
) =>
882+
super.noSuchMethod(
883+
Invocation.method(
884+
#revertToKJVIfOETBookNotAvailable,
885+
[
886+
thebibleCode,
887+
theBookCode,
888+
area,
889+
],
890+
),
891+
returnValueForMissingStub: null,
892+
);
893+
864894
@override
865895
void addBookToRecentHistory(String? book) => super.noSuchMethod(
866896
Invocation.method(
@@ -871,7 +901,28 @@ class MockBiblesService extends _i1.Mock implements _i7.BiblesService {
871901
);
872902

873903
@override
874-
void listenToReactiveValues(List<dynamic>? reactiveValues) => super.noSuchMethod(
904+
bool isBibleOET(String? bible) => (super.noSuchMethod(
905+
Invocation.method(
906+
#isBibleOET,
907+
[bible],
908+
),
909+
returnValue: false,
910+
returnValueForMissingStub: false,
911+
) as bool);
912+
913+
@override
914+
bool isReaderBibleOET(_i8.Area? readerArea) => (super.noSuchMethod(
915+
Invocation.method(
916+
#isReaderBibleOET,
917+
[readerArea],
918+
),
919+
returnValue: false,
920+
returnValueForMissingStub: false,
921+
) as bool);
922+
923+
@override
924+
void listenToReactiveValues(List<dynamic>? reactiveValues) =>
925+
super.noSuchMethod(
875926
Invocation.method(
876927
#listenToReactiveValues,
877928
[reactiveValues],
@@ -1100,7 +1151,8 @@ class MockSettingsService extends _i1.Mock implements _i9.SettingsService {
11001151
[],
11011152
),
11021153
)),
1103-
returnValueForMissingStub: _i5.Future<String>.value(_i3.dummyValue<String>(
1154+
returnValueForMissingStub:
1155+
_i5.Future<String>.value(_i3.dummyValue<String>(
11041156
this,
11051157
Invocation.method(
11061158
#getPrimaryAreaBible,
@@ -1132,7 +1184,8 @@ class MockSettingsService extends _i1.Mock implements _i9.SettingsService {
11321184
[],
11331185
),
11341186
)),
1135-
returnValueForMissingStub: _i5.Future<String>.value(_i3.dummyValue<String>(
1187+
returnValueForMissingStub:
1188+
_i5.Future<String>.value(_i3.dummyValue<String>(
11361189
this,
11371190
Invocation.method(
11381191
#getSecondaryAreaBible,
@@ -1164,7 +1217,8 @@ class MockSettingsService extends _i1.Mock implements _i9.SettingsService {
11641217
[],
11651218
),
11661219
)),
1167-
returnValueForMissingStub: _i5.Future<String>.value(_i3.dummyValue<String>(
1220+
returnValueForMissingStub:
1221+
_i5.Future<String>.value(_i3.dummyValue<String>(
11681222
this,
11691223
Invocation.method(
11701224
#getBook,
@@ -1214,7 +1268,8 @@ class MockSettingsService extends _i1.Mock implements _i9.SettingsService {
12141268
) as _i5.Future<int>);
12151269

12161270
@override
1217-
_i5.Future<void> setNavRecentBooks(List<String>? value) => (super.noSuchMethod(
1271+
_i5.Future<void> setNavRecentBooks(List<String>? value) =>
1272+
(super.noSuchMethod(
12181273
Invocation.method(
12191274
#setNavRecentBooks,
12201275
[value],
@@ -1250,7 +1305,8 @@ class MockSettingsService extends _i1.Mock implements _i9.SettingsService {
12501305
[],
12511306
),
12521307
returnValue: _i5.Future<_i8.ViewBy>.value(_i8.ViewBy.chapter),
1253-
returnValueForMissingStub: _i5.Future<_i8.ViewBy>.value(_i8.ViewBy.chapter),
1308+
returnValueForMissingStub:
1309+
_i5.Future<_i8.ViewBy>.value(_i8.ViewBy.chapter),
12541310
) as _i5.Future<_i8.ViewBy>);
12551311

12561312
@override
@@ -1314,7 +1370,8 @@ class MockSettingsService extends _i1.Mock implements _i9.SettingsService {
13141370
) as _i5.Future<bool>);
13151371

13161372
@override
1317-
_i5.Future<void> setLinkReaderAreaScrolling(bool? value) => (super.noSuchMethod(
1373+
_i5.Future<void> setLinkReaderAreaScrolling(bool? value) =>
1374+
(super.noSuchMethod(
13181375
Invocation.method(
13191376
#setLinkReaderAreaScrolling,
13201377
[value],
@@ -1334,7 +1391,8 @@ class MockSettingsService extends _i1.Mock implements _i9.SettingsService {
13341391
) as _i5.Future<bool>);
13351392

13361393
@override
1337-
void listenToReactiveValues(List<dynamic>? reactiveValues) => super.noSuchMethod(
1394+
void listenToReactiveValues(List<dynamic>? reactiveValues) =>
1395+
super.noSuchMethod(
13381396
Invocation.method(
13391397
#listenToReactiveValues,
13401398
[reactiveValues],
@@ -1387,7 +1445,8 @@ class MockAppInfoService extends _i1.Mock implements _i10.AppInfoService {
13871445
[],
13881446
),
13891447
)),
1390-
returnValueForMissingStub: _i5.Future<String>.value(_i3.dummyValue<String>(
1448+
returnValueForMissingStub:
1449+
_i5.Future<String>.value(_i3.dummyValue<String>(
13911450
this,
13921451
Invocation.method(
13931452
#getAppVersion,
@@ -1521,17 +1580,22 @@ class MockJsonService extends _i1.Mock implements _i12.JsonService {
15211580
bookCode,
15221581
],
15231582
),
1524-
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
1525-
returnValueForMissingStub: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
1583+
returnValue:
1584+
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
1585+
returnValueForMissingStub:
1586+
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
15261587
) as _i5.Future<Map<String, dynamic>>);
15271588

15281589
@override
1529-
_i5.Future<Map<String, dynamic>> loadJsonFromAssets(String? path) => (super.noSuchMethod(
1590+
_i5.Future<Map<String, dynamic>> loadJsonFromAssets(String? path) =>
1591+
(super.noSuchMethod(
15301592
Invocation.method(
15311593
#loadJsonFromAssets,
15321594
[path],
15331595
),
1534-
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
1535-
returnValueForMissingStub: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
1596+
returnValue:
1597+
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
1598+
returnValueForMissingStub:
1599+
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
15361600
) as _i5.Future<Map<String, dynamic>>);
15371601
}

0 commit comments

Comments
 (0)