Skip to content

Commit 06255d9

Browse files
committed
chore: improve color item
1 parent 4dcb220 commit 06255d9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

feature/home/lib/src/presentation/widget/home_screen.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,19 @@ class _ColorItem extends StatelessWidget {
7676

7777
@override
7878
Widget build(BuildContext context) {
79+
final colorScheme = Theme.of(context).colorScheme;
80+
7981
return InkWell(
8082
borderRadius: BorderRadius.circular(16),
8183
onTap: () => onTap(color),
8284
child: SizedBox.square(
8385
dimension: 48,
8486
child: DecoratedBox(
8587
decoration: BoxDecoration(
86-
border: Border.all(
87-
width: 2,
88-
color: isSelected ? Colors.black : Colors.transparent,
89-
),
90-
borderRadius: BorderRadius.circular(16),
9188
color: color,
89+
borderRadius: BorderRadius.circular(16),
9290
),
91+
child: isSelected ? Icon(Icons.check, color: colorScheme.onPrimaryFixed) : null,
9392
),
9493
),
9594
);

0 commit comments

Comments
 (0)