Skip to content

Commit b534cf4

Browse files
author
Adam Hammer
committed
updated colors/themes
1 parent 80ebf25 commit b534cf4

File tree

2 files changed

+40
-43
lines changed

2 files changed

+40
-43
lines changed

lib/src/ui/components/game_board.dart

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,24 @@ class GameBoard extends StatelessWidget {
2424

2525
@override
2626
Widget build(BuildContext context) {
27-
return Container(
27+
return Container(
2828
child: Column(
29-
children: <Widget>[
30-
Padding(
31-
padding: const EdgeInsets.fromLTRB(
32-
kBoardEdgePadding, kBoardEdgePadding, kBoardEdgePadding, 0),
33-
child: GameBoardHeader(),
34-
),
35-
Expanded(
36-
child: Container(
37-
width: double.infinity,
38-
child: Padding(
39-
padding: const EdgeInsets.all(kBoardEdgePadding),
40-
child: MineField(),
41-
),
42-
))
43-
],
44-
));
29+
children: <Widget>[
30+
Padding(
31+
padding: const EdgeInsets.fromLTRB(
32+
kBoardEdgePadding, kBoardEdgePadding, kBoardEdgePadding, 0),
33+
child: GameBoardHeader(),
34+
),
35+
Expanded(
36+
child: Container(
37+
width: double.infinity,
38+
child: Padding(
39+
padding: const EdgeInsets.all(kBoardEdgePadding),
40+
child: MineField(),
41+
),
42+
))
43+
],
44+
));
4545
}
4646
}
4747

@@ -55,37 +55,35 @@ class GameBoardHeader extends StatelessWidget {
5555

5656
@override
5757
Widget build(BuildContext context) {
58-
return Container(
59-
color: Colors.blueGrey,
58+
return Card(
6059
child: Padding(
6160
padding: const EdgeInsets.all(8),
6261
child: Row(
6362
children: <Widget>[
64-
Container(
65-
color: Colors.red,
66-
width: 128,
67-
height: 48,
68-
child: const Center(child: const BombsRemaining()),
63+
const Expanded(
64+
child: const Card(
65+
child: const Center(child: const BombsRemaining())),
6966
),
7067
Expanded(child: Container()),
7168
Center(
72-
child: FlatButton(
73-
color: Colors.green,
69+
child: Card(
70+
child: FlatButton(
71+
7472
child: Text(
75-
"😀",
76-
textScaleFactor: 2.0,
73+
"😀",
74+
textScaleFactor: 2.0,
7775
),
7876
onPressed: () {
79-
Provider.of<Store<AppState>>(context)
80-
.dispatch(NewGameAction(MineSweeper.newGame()));
77+
Provider.of<Store<AppState>>(context)
78+
.dispatch(NewGameAction(MineSweeper.newGame()));
8179
},
82-
)),
80+
),
81+
)),
8382
Expanded(child: Container()),
84-
Container(
85-
color: Colors.blue,
86-
width: 127,
87-
height: 48,
88-
child: const Center(child: const GameTimer())),
83+
const Expanded(
84+
child: const Card(
85+
child: const Center(child: const GameTimer())),
86+
),
8987
],
9088
),
9189
),

lib/src/ui/components/mine_block.dart

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,17 @@ class _MineBlockState extends State<MineBlock> {
6565
bombBox(BuildContext context) =>
6666
BoxDecoration(color: Colors.red,
6767
borderRadius: BorderRadius.circular(50)
68-
, boxShadow: [BoxShadow()]);
68+
, boxShadow: [BoxShadow(color: Colors.blue)]);
6969

7070
hoverBox(BuildContext context) =>
71-
BoxDecoration(color: Theme.of(context).colorScheme.surface,
72-
borderRadius: BorderRadius.circular(15)
73-
, boxShadow: [BoxShadow(color: Colors.black, blurRadius: 3, spreadRadius: 3)]);
71+
BoxDecoration(color: Theme.of(context).colorScheme.primaryVariant,
72+
boxShadow: [BoxShadow(color: Colors.black, blurRadius: 4, spreadRadius: 4)]);
7473

7574
unknownBox(BuildContext context) =>
76-
BoxDecoration(color: Theme.of(context).colorScheme.surface
77-
, boxShadow: [BoxShadow(color: Colors.black, blurRadius: 3, spreadRadius: 1)]);
75+
BoxDecoration(color: Theme.of(context).colorScheme.primaryVariant
76+
, boxShadow: [BoxShadow(color: Colors.blue, blurRadius: 3, spreadRadius: 1)]);
7877

7978
cleanBox(BuildContext context) =>
8079
BoxDecoration(color: Theme.of(context).colorScheme.surface,
81-
boxShadow: [BoxShadow(color: Colors.black12, blurRadius: 2)] );
80+
boxShadow: [BoxShadow(color: Colors.blue.withOpacity(0.1), blurRadius: 2)] );
8281

0 commit comments

Comments
 (0)