11import 'package:flutter/material.dart' ;
22import 'package:flutter/services.dart' ;
3- import 'main .dart' ;
3+ import 'package:sudoku/Styles .dart' ;
44
55class AlertGameOver extends StatelessWidget {
66 static bool newGame = false ;
@@ -10,19 +10,26 @@ class AlertGameOver extends StatelessWidget {
1010 Widget build (BuildContext context) {
1111 return AlertDialog (
1212 shape: RoundedRectangleBorder (borderRadius: BorderRadius .circular (10 )),
13- title: Text ('Game Over' ),
14- content: Text ('You successfully solved the Sudoku' ),
13+ backgroundColor: Styles .bg_2,
14+ title: Text (
15+ 'Game Over' ,
16+ style: TextStyle (color: Styles .fg),
17+ ),
18+ content: Text (
19+ 'You successfully solved the Sudoku' ,
20+ style: TextStyle (color: Styles .fg),
21+ ),
1522 actions: [
1623 FlatButton (
17- textColor: MyApp .primaryColor,
24+ textColor: Styles .primaryColor,
1825 onPressed: () {
1926 Navigator .pop (context);
2027 restartGame = true ;
2128 },
2229 child: Text ('Restart Game' ),
2330 ),
2431 FlatButton (
25- textColor: MyApp .primaryColor,
32+ textColor: Styles .primaryColor,
2633 onPressed: () {
2734 Navigator .pop (context);
2835 newGame = true ;
@@ -72,7 +79,12 @@ class AlertDifficulty extends State<AlertDifficultyState> {
7279 Widget build (BuildContext context) {
7380 return SimpleDialog (
7481 shape: RoundedRectangleBorder (borderRadius: BorderRadius .circular (10 )),
75- title: Center (child: Text ('Select Difficulty Level' )),
82+ title: Center (
83+ child: Text (
84+ 'Select Difficulty Level' ,
85+ style: TextStyle (color: Styles .fg),
86+ )),
87+ backgroundColor: Styles .bg_2,
7688 contentPadding: EdgeInsets .fromLTRB (10 , 10 , 10 , 10 ),
7789 children: < Widget > [
7890 for (String level in difficulties)
@@ -90,8 +102,8 @@ class AlertDifficulty extends State<AlertDifficultyState> {
90102 style: TextStyle (
91103 fontSize: 15 ,
92104 color: level == this .currentDifficultyLevel
93- ? MyApp .primaryColor
94- : Colors .black )),
105+ ? Styles .primaryColor
106+ : Styles .fg )),
95107 ),
96108 ],
97109 );
@@ -103,18 +115,25 @@ class AlertExit extends StatelessWidget {
103115 Widget build (BuildContext context) {
104116 return AlertDialog (
105117 shape: RoundedRectangleBorder (borderRadius: BorderRadius .circular (10 )),
106- title: Text ('Exit Game' ),
107- content: Text ('Are you sure you want to exit the game ?' ),
118+ backgroundColor: Styles .bg_2,
119+ title: Text (
120+ 'Exit Game' ,
121+ style: TextStyle (color: Styles .fg),
122+ ),
123+ content: Text (
124+ 'Are you sure you want to exit the game ?' ,
125+ style: TextStyle (color: Styles .fg),
126+ ),
108127 actions: [
109128 FlatButton (
110- textColor: MyApp .primaryColor,
129+ textColor: Styles .primaryColor,
111130 onPressed: () {
112131 Navigator .pop (context);
113132 },
114133 child: Text ('No' ),
115134 ),
116135 FlatButton (
117- textColor: MyApp .primaryColor,
136+ textColor: Styles .primaryColor,
118137 onPressed: () {
119138 SystemNavigator .pop ();
120139 },
@@ -159,12 +178,12 @@ class AlertNumbers extends State<AlertNumbersState> {
159178 Navigator .pop (context);
160179 })
161180 },
162- color: Colors .white ,
163- textColor: MyApp .primaryColor,
181+ color: Styles .bg_2 ,
182+ textColor: Styles .primaryColor,
164183 highlightColor: Colors .blueAccent,
165184 shape: RoundedRectangleBorder (
166185 side: BorderSide (
167- color: Colors .black ,
186+ color: Styles .fg ,
168187 width: 1 ,
169188 style: BorderStyle .solid,
170189 ),
@@ -199,7 +218,12 @@ class AlertNumbers extends State<AlertNumbersState> {
199218 Widget build (BuildContext context) {
200219 return AlertDialog (
201220 shape: RoundedRectangleBorder (borderRadius: BorderRadius .circular (10 )),
202- title: Center (child: Text ('Choose a Number' )),
221+ backgroundColor: Styles .bg_2,
222+ title: Center (
223+ child: Text (
224+ 'Choose a Number' ,
225+ style: TextStyle (color: Styles .fg),
226+ )),
203227 content: Column (
204228 mainAxisSize: MainAxisSize .min,
205229 mainAxisAlignment: MainAxisAlignment .center,
0 commit comments