Select Git revision
home_page.dart
home_page.dart 2.51 KiB
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:puissance4/cpu.dart';
import 'match_page.dart';
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.blue,
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
FlatButton(
color: Colors.green,
padding: EdgeInsets.all(15),
child: Text(
'🧑 2 JOUEURS 🧑',
style: Theme.of(context)
.textTheme
.display1
.copyWith(color: Colors.white),
),
onPressed: () {
Navigator.pushNamed(
context,
'/match',
arguments: {
'mode': Mode.PVP,
},
);
},
),
FlatButton(
color: Colors.orange,
padding: EdgeInsets.all(15),
child: Text(
'🧑 1 JOUEUR 🤖',
style: Theme.of(context)
.textTheme
.display1
.copyWith(color: Colors.white),
),
onPressed: () {
Navigator.pushNamed(
context,
'/cpu-level',
arguments: {
'mode': Mode.PVC,
},
);
},
),
FlatButton(
color: Colors.white,
padding: EdgeInsets.all(15),
child: Text(
'🤖 DEMO 🤖',
style: Theme.of(context)
.textTheme
.display1
.copyWith(color: Colors.black),
),
onPressed: () {
final harderCpu =