generated from me/template-mit
Make the game board its own widget.
This commit is contained in:
@@ -9,9 +9,16 @@ class MainApp extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
home: Scaffold(
|
||||
body: Row(
|
||||
return const MaterialApp(home: Scaffold(body: GameBoard()));
|
||||
}
|
||||
}
|
||||
|
||||
class GameBoard extends StatelessWidget {
|
||||
const GameBoard({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
@@ -52,8 +59,6 @@ class MainApp extends StatelessWidget {
|
||||
// Player 2 Goal
|
||||
Column(children: [Center(child: Text(" P2 "))]),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user