From 655b6002b932383add33f522e3363743610cbd0a Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Fri, 12 Jan 2024 23:13:21 +0100 Subject: [PATCH] Set surface tint color --- .../sharezone_plus_page_ui_test.dart | 28 ++++------------- .../lib/src/theme/brightness/light_theme.dart | 1 + .../sharezone_plus/sharezone_plus_test.dart | 31 +++++-------------- 3 files changed, 15 insertions(+), 45 deletions(-) diff --git a/lib/sharezone_plus/sharezone_plus_page_ui/test_goldens/sharezone_plus_page_ui_test.dart b/lib/sharezone_plus/sharezone_plus_page_ui/test_goldens/sharezone_plus_page_ui_test.dart index 6acf43aa1..861147e3c 100644 --- a/lib/sharezone_plus/sharezone_plus_page_ui/test_goldens/sharezone_plus_page_ui_test.dart +++ b/lib/sharezone_plus/sharezone_plus_page_ui/test_goldens/sharezone_plus_page_ui_test.dart @@ -35,18 +35,11 @@ void main() { required ThemeData theme, }) async { await tester.pumpWidgetBuilder( - Builder( - builder: (context) { - return Material( - color: Theme.of(context).scaffoldBackgroundColor, - child: const SingleChildScrollView( - child: SharezonePlusAdvantages( - isHomeworkDoneListsFeatureVisible: true, - isHomeworkReminderFeatureVisible: true, - ), - ), - ); - }, + const SingleChildScrollView( + child: SharezonePlusAdvantages( + isHomeworkDoneListsFeatureVisible: true, + isHomeworkReminderFeatureVisible: true, + ), ), wrapper: materialAppWrapper(theme: theme), ); @@ -112,16 +105,7 @@ void main() { testGoldens('renders faq section as expected (light theme)', (tester) async { await tester.pumpWidgetBuilder( - Builder( - builder: (context) { - return Material( - color: Theme.of(context).scaffoldBackgroundColor, - child: const SingleChildScrollView( - child: SharezonePlusFaq(), - ), - ); - }, - ), + const SingleChildScrollView(child: SharezonePlusFaq()), wrapper: materialAppWrapper(theme: getLightTheme(fontFamily: roboto)), ); diff --git a/lib/sharezone_widgets/lib/src/theme/brightness/light_theme.dart b/lib/sharezone_widgets/lib/src/theme/brightness/light_theme.dart index 19bc4ca24..d6ea32296 100644 --- a/lib/sharezone_widgets/lib/src/theme/brightness/light_theme.dart +++ b/lib/sharezone_widgets/lib/src/theme/brightness/light_theme.dart @@ -117,6 +117,7 @@ ThemeData getLightTheme({ brightness: Brightness.light, error: _errorCode, primary: primaryColor, + surfaceTint: Colors.white, ), ); } diff --git a/lib/sharezone_widgets/test_goldens/sharezone_plus/sharezone_plus_test.dart b/lib/sharezone_widgets/test_goldens/sharezone_plus/sharezone_plus_test.dart index 78bb4828c..a27f0b421 100644 --- a/lib/sharezone_widgets/test_goldens/sharezone_plus/sharezone_plus_test.dart +++ b/lib/sharezone_widgets/test_goldens/sharezone_plus/sharezone_plus_test.dart @@ -19,16 +19,7 @@ void main() { ThemeData? theme, }) async { await tester.pumpWidgetBuilder( - Builder( - builder: (context) { - return Material( - color: Theme.of(context).scaffoldBackgroundColor, - child: const Center( - child: SharezonePlusChip(), - ), - ); - }, - ), + const Center(child: SharezonePlusChip()), wrapper: materialAppWrapper(theme: theme), ); } @@ -58,19 +49,13 @@ void main() { ThemeData? theme, }) async { await tester.pumpWidgetBuilder( - Builder( - builder: (context) { - return Material( - color: Theme.of(context).scaffoldBackgroundColor, - child: Center( - child: SharezonePlusFeatureInfoCard( - withLearnMoreButton: true, - child: const Text( - 'Erwerbe Sharezone Plus, um nachzuvollziehen, wer den Infozettel bereits gelesen hat.'), - onLearnMorePressed: () {}, - )), - ); - }, + Center( + child: SharezonePlusFeatureInfoCard( + withLearnMoreButton: true, + child: const Text( + 'Erwerbe Sharezone Plus, um nachzuvollziehen, wer den Infozettel bereits gelesen hat.'), + onLearnMorePressed: () {}, + ), ), wrapper: materialAppWrapper(theme: theme), );