mirror of
https://github.com/tonytins/bullseye.git
synced 2025-03-15 12:21:21 +00:00
53 lines
1.6 KiB
Dart
53 lines
1.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
void main() => runApp(BullsEyeApp());
|
|
|
|
class BullsEyeApp extends StatelessWidget {
|
|
// This widget is the root of your application.
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'BullsEye',
|
|
theme: ThemeData(
|
|
// This is the theme of your application.
|
|
//
|
|
// Try running your application with "flutter run". You'll see the
|
|
// application has a blue toolbar. Then, without quitting the app, try
|
|
// changing the primarySwatch below to Colors.green and then invoke
|
|
// "hot reload" (press "r" in the console where you ran "flutter run",
|
|
// or simply save your changes to "hot reload" in a Flutter IDE).
|
|
// Notice that the counter didn't reset back to zero; the application
|
|
// is not restarted.
|
|
primarySwatch: Colors.blue,
|
|
),
|
|
home: GamePage(title: 'BullsEye'),
|
|
);
|
|
}
|
|
}
|
|
|
|
class GamePage extends StatefulWidget {
|
|
GamePage({Key key, this.title}) : super(key: key);
|
|
final String title;
|
|
|
|
@override
|
|
_GamePageState createState() => _GamePageState();
|
|
}
|
|
|
|
class _GamePageState extends State<GamePage> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Text("Hello World!",
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.bold, color: Colors.green)),
|
|
TextButton(child: Text('Hit me!'), onPressed: () {})
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|