Skip to content
Snippets Groups Projects
Select Git revision
  • 03600ac5359adbf4024ee0a4f5584d11d6dec3f4
  • master default protected
  • 84-improve-app-metadata
  • 82-fix-colors
  • 23-add-timer
  • 65-update-icons
  • Release_0.10.1_88 protected
  • Release_0.10.0_87 protected
  • Release_0.9.2_86 protected
  • Release_0.9.1_85 protected
  • Release_0.9.0_84 protected
  • Release_0.8.0_83 protected
  • Release_0.7.0_82 protected
  • Release_0.6.0_81 protected
  • Release_0.5.2_80 protected
  • Release_0.5.1_79 protected
  • Release_0.5.0_78 protected
  • Release_0.4.1_77 protected
  • Release_0.4.0_76 protected
  • Release_0.3.1_75 protected
  • Release_0.3.0_74 protected
  • Release_0.2.1_73 protected
  • Release_0.2.0_72 protected
  • Release_0.1.22_71 protected
  • Release_0.1.21_70 protected
  • Release_0.1.20_69 protected
26 results

parameter_image.dart

Blame
  • 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 =