import 'package:flutter/material.dart';
import 'package:skillcourt/pages/manual_game_mode.dart';
import 'package:skillcourt/pages/random_game_mode.dart';

class GameMode extends StatefulWidget {
  static const routeName = 'GameModes';

  const GameMode({Key? key}) : super(key: key);

  @override
  _GameMode createState() => _GameMode();
}

class _GameMode extends State<GameMode> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: const Text('Select Game Mode'),
        ),
        body: Center(
          child: Row(
            children: <Widget>[
              Expanded(
                  child: ElevatedButton(
                onPressed: () =>
                    Navigator.pushNamed(context, RandomGameMode.routeName),
                child: const Text('Random'),
              )),
              Expanded(
                child: ElevatedButton(
                  onPressed: () =>
                      Navigator.pushNamed(context, ManualGameMode.routeName),
                  child: const Text('Manual'),
                ),
              )
            ],
          ),
        ));
  }
}
