Make the game board its own widget.

This commit is contained in:
2026-02-24 11:23:53 -07:00
parent 5ec7fb02db
commit 27fde6474e

View File

@@ -9,9 +9,16 @@ class MainApp extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return const MaterialApp( return const MaterialApp(home: Scaffold(body: GameBoard()));
home: Scaffold( }
body: Row( }
class GameBoard extends StatelessWidget {
const GameBoard({super.key});
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
@@ -52,8 +59,6 @@ class MainApp extends StatelessWidget {
// Player 2 Goal // Player 2 Goal
Column(children: [Center(child: Text(" P2 "))]), Column(children: [Center(child: Text(" P2 "))]),
], ],
),
),
); );
} }
} }