Skip to content

Commit

Permalink
Fix date chips tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AhsanSarwar45 committed Dec 16, 2023
1 parent 2b8582a commit e21a74d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/common/logic/card_decoration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 2 additions & 0 deletions test/common/widgets/fields/date_picker_field_test.dart
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -75,6 +76,7 @@ Future<void> _renderWidget(WidgetTester tester,
void Function(List<DateTime>)? onChanged}) async {
await tester.pumpWidget(
MaterialApp(
theme: defaultTheme,
home: Scaffold(
body: DatePickerField(
value: value,
Expand Down

0 comments on commit e21a74d

Please sign in to comment.