49 lines
1.1 KiB
Dart
49 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'game.dart';
|
|
import 'tutFun.dart';
|
|
|
|
void main() {
|
|
runApp(const MainApp());
|
|
}
|
|
|
|
class MainApp extends StatelessWidget {
|
|
const MainApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return const MaterialApp(
|
|
home: Scaffold(
|
|
body: Center(
|
|
//child: Text('Wow, nice, Hello World!'),
|
|
child: Tile("A", .hit),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
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,
|
|
);
|
|
}
|
|
}
|