Skip to content

Commit

Permalink
[game] [minesweeper] fixed style issue
Browse files Browse the repository at this point in the history
  • Loading branch information
liplum committed Sep 24, 2024
1 parent 5050020 commit 29ea2a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 2 additions & 4 deletions lib/game/minesweeper/widget/cell/cover.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ class CellCover extends StatelessWidget {
curve: Curves.ease,
duration: visible ? Duration.zero : Durations.long1,
child: Container(
margin: const EdgeInsets.all(1),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.0),
color: context.colorScheme.surfaceContainerHighest,
border: Border.all(
width: 1,
color: context.colorScheme.surface,
),
),
),
);
Expand Down
10 changes: 7 additions & 3 deletions lib/game/minesweeper/widget/modal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ class GameOverModal extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) {
return Positioned.fill(
child: InkWell(
borderRadius: BorderRadius.circular(12.0),
onTap: () {
resetGame();
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.0),
color: gameOverColor.withOpacity(0.5),
),
child: Text(
Expand Down Expand Up @@ -50,18 +52,20 @@ class VictoryModal extends ConsumerWidget {
return Positioned.fill(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.0),
color: victoryColor.withOpacity(0.5),
),
child: MaterialButton(
onPressed: () {
child: InkWell(
borderRadius: BorderRadius.circular(12.0),
onTap: () {
resetGame();
},
child: Text(
"${i18n.youWin}\n${i18n.timeSpent(i18n.formatPlaytime(playTime))}",
style: const TextStyle(
fontSize: 64.0,
),
),
).center(),
),
),
);
Expand Down

0 comments on commit 29ea2a5

Please sign in to comment.