diff --git a/lib/common/logic/card_decoration.dart b/lib/common/logic/card_decoration.dart index 60a696b1..df0857bb 100644 --- a/lib/common/logic/card_decoration.dart +++ b/lib/common/logic/card_decoration.dart @@ -25,9 +25,9 @@ BoxDecoration getCardDecoration(BuildContext context, strokeAlign: BorderSide.strokeAlignInside, ) : null, - color: color ?? Theme.of(context).colorScheme.surface, - borderRadius: (Theme.of(context).cardTheme.shape as RoundedRectangleBorder) - .borderRadius, + color: color ?? colorScheme.surface, + borderRadius: + (theme.cardTheme.shape as RoundedRectangleBorder).borderRadius, boxShadow: [ if (showShadow && (themeStyle?.shadowOpacity ?? 0) > 0) BoxShadow( diff --git a/test/common/widgets/fields/date_picker_field_test.dart b/test/common/widgets/fields/date_picker_field_test.dart index fbaf5392..51406f3b 100644 --- a/test/common/widgets/fields/date_picker_field_test.dart +++ b/test/common/widgets/fields/date_picker_field_test.dart @@ -1,4 +1,5 @@ import 'package:clock_app/common/widgets/fields/date_picker_field.dart'; +import 'package:clock_app/theme/theme.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -75,6 +76,7 @@ Future _renderWidget(WidgetTester tester, void Function(List)? onChanged}) async { await tester.pumpWidget( MaterialApp( + theme: defaultTheme, home: Scaffold( body: DatePickerField( value: value,