Do Widgets tutorial #1
@@ -13,7 +13,22 @@ class GamePage extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container();
|
return Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Column(
|
||||||
|
spacing: 5.0,
|
||||||
|
children: [
|
||||||
|
for (final guess in _game.guesses)
|
||||||
|
Row(
|
||||||
|
spacing: 5.0,
|
||||||
|
children: [
|
||||||
|
for (final letter in guess)
|
||||||
|
Tile(letter.char, letter.type)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,7 +45,6 @@ class MainApp extends StatelessWidget {
|
|||||||
child: Text("Birdle"),
|
child: Text("Birdle"),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
//body: Center(child: Tile("A", HitType.hit)),
|
|
||||||
body: Center(child: GamePage()),
|
body: Center(child: GamePage()),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user