match_magic/lib/screens/main_menu.dart

71 lines
2.0 KiB
Dart

import 'package:flutter/material.dart';
import 'package:match_magic/game/match_magic_game.dart';
class MainMenu extends StatelessWidget {
const MainMenu({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
leading: IconButton(
icon: const Icon(Icons.settings, color: Colors.white),
onPressed: () {
showDialog(
context: context,
builder: (context) => AlertDialog(
title: const Text('Settings'),
content:
const Text('The settings have not yet been implemented.'),
actions: [
TextButton(
onPressed: () {
Navigator.of(context).pop();
},
child: const Text('Ok'),
),
],
),
);
},
),
backgroundColor: Colors.black,
),
backgroundColor: Colors.black,
body: Center(
child: Column(
children: [
const SizedBox(
height: 100,
),
const Text(
'Match Magic',
style: TextStyle(
fontSize: 28,
fontWeight: FontWeight.bold,
color: Colors.white),
),
const SizedBox(
height: 300,
),
ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const MatchMagicGameScreen()),
);
},
style: ElevatedButton.styleFrom(
padding: const EdgeInsets.symmetric(
horizontal: 60.0, vertical: 16.0),
),
child: const Text('Play', style: TextStyle(fontSize: 16)),
),
],
),
),
);
}
}