This commit is contained in:
Roland Geider
2026-08-28 11:54:15 +02:00
parent cb202500c9
commit f826a52565

View File

@@ -51,6 +51,9 @@ void main() {
setUp(() {
when(mockSharedPreferences.getBool(any)).thenAnswer((_) async => null);
when(mockSharedPreferences.getString(any)).thenAnswer((_) async => null);
when(
mockSharedPreferences.getAll(allowList: anyNamed('allowList')),
).thenAnswer((_) async => {});
when(
mockSharedPreferences.setBool(any, any),
).thenAnswer((_) async {});
@@ -103,7 +106,9 @@ void main() {
});
testWidgets('dynamic color switch reflects a stored preference', (WidgetTester tester) async {
when(mockSharedPreferences.getBool(PREFS_USE_DYNAMIC_COLOR)).thenAnswer((_) async => true);
when(
mockSharedPreferences.getAll(allowList: anyNamed('allowList')),
).thenAnswer((_) async => {PREFS_USE_DYNAMIC_COLOR: true});
await tester.pumpWidget(createSettingsScreen());
await tester.pumpAndSettle();