NEW: MIH MineSweeper Package pt4

This commit is contained in:
2025-10-31 11:55:31 +02:00
parent d6f1629485
commit 771d809ce2

View File

@@ -274,7 +274,7 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
alertBody: Column(
children: [
Text(
"Your lost this game of MIH MineSweeper!!!",
"Your lost this game of MIH Minesweeper!!!",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20,
@@ -405,7 +405,7 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
alertBody: Column(
children: [
Text(
"Your won this game of MIH MineSweeper!!!",
"Your won this game of MIH Minesweeper!!!",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20,
@@ -565,14 +565,18 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
MihMineSweeperProvider mihMineSweeperProvider,
MihBannerAdProvider adProvider,
Widget? child) {
return Stack(
return Column(
children: [
Expanded(
child: Stack(
alignment: Alignment.topCenter,
children: [
MihSingleChildScroll(
child: board.isEmpty && squaresLeft < 0
// Start Up Message before setting up game
? Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
padding:
const EdgeInsets.symmetric(horizontal: 10.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
@@ -582,7 +586,9 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
MihIcons.mineSweeper,
size: 165,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
),
const SizedBox(height: 10),
@@ -594,7 +600,9 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
fontSize: 25,
fontWeight: FontWeight.bold,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
),
),
@@ -615,7 +623,8 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
children: [
TextSpan(text: "Press "),
WidgetSpan(
alignment: PlaceholderAlignment.middle,
alignment:
PlaceholderAlignment.middle,
child: Icon(
Icons.menu,
size: 20,
@@ -643,7 +652,8 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
children: [
// Display game status
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: [
Expanded(
child: Padding(
@@ -679,7 +689,8 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: getDifficultyColor(mihMineSweeperProvider),
color: getDifficultyColor(
mihMineSweeperProvider),
),
),
@@ -714,15 +725,18 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
return MineTile(
square: board[r][c],
onTap: () => handleTap(profileProvider,
mihMineSweeperProvider, adProvider, r, c),
onTap: () => handleTap(
profileProvider,
mihMineSweeperProvider,
adProvider,
r,
c),
onLongPress: () => handleLongPress(r, c),
);
},
),
),
SizedBox(height: 30),
MihBannerAd(),
// const SizedBox(height: 100),
],
),
@@ -780,12 +794,18 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
onTap: () {
showStartGameWindow(mihMineSweeperProvider, adProvider);
showStartGameWindow(
mihMineSweeperProvider, adProvider);
},
),
]),
)
],
),
),
MihBannerAd(),
SizedBox(height: 15),
],
);
},
);