64 lines
1.5 KiB
Dart
64 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'game.dart';
|
|
import 'tutFun.dart';
|
|
|
|
void main() {
|
|
runApp(const MainApp());
|
|
}
|
|
|
|
class GamePage extends StatelessWidget {
|
|
GamePage({super.key});
|
|
|
|
final Game _game = Game();
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container();
|
|
}
|
|
}
|
|
|
|
class MainApp extends StatelessWidget {
|
|
const MainApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
home: Scaffold(
|
|
appBar: AppBar(
|
|
title: Align(
|
|
alignment: Alignment.centerLeft,
|
|
child: Text("Birdle"),
|
|
),
|
|
),
|
|
//body: Center(child: Tile("A", HitType.hit)),
|
|
body: Center(child: GamePage()),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class Tile extends StatelessWidget {
|
|
const Tile(this.letter, this.hitType, {super.key});
|
|
|
|
final String letter;
|
|
final HitType hitType;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
child: Center(
|
|
child: Text(
|
|
letter.toUpperCase(),
|
|
style: Theme.of(context).textTheme.titleLarge,
|
|
),
|
|
),
|
|
decoration: BoxDecoration(
|
|
border: Border.all(color: Colors.grey.shade300),
|
|
color: tutTileColor(hitType),
|
|
),
|
|
height: 60,
|
|
width: 60,
|
|
);
|
|
}
|
|
}
|