super_tik_tac_toe/lib/main.dart

57 lines
1.3 KiB
Dart
Raw Normal View History

2024-12-06 15:33:35 -05:00
import 'package:flutter/material.dart';
2024-12-21 06:36:11 -05:00
import 'clasic.dart';
2024-12-06 15:33:35 -05:00
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
2024-12-06 21:21:10 -05:00
title: 'Super Tic-Tac-Toe',
2024-12-06 15:33:35 -05:00
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
2024-12-06 21:21:10 -05:00
home: const MyHomePage(title: 'Local Tic Tac Toe'),
2024-12-06 15:33:35 -05:00
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
2024-12-21 06:36:11 -05:00
drawer: Drawer(
child: ListView(
children: [
DrawerHeader(
child: Text("Game Types"),
),
ListTile(title: Text("Clasic")),
ListTile(title: Text("Super")),
],
)),
appBar: AppBar(
title: Text(widget.title),
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
),
body: Padding(
2024-12-06 21:21:10 -05:00
padding: const EdgeInsets.all(10),
2024-12-21 06:36:11 -05:00
child: ClassicGame(),
));
2024-12-20 12:41:49 -05:00
}
2024-12-06 15:33:35 -05:00
}