53 lines
1.5 KiB
Dart
53 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import '../bloc/game_bloc.dart';
|
|
import 'game_screen.dart';
|
|
|
|
class MenuScreen extends StatelessWidget {
|
|
const MenuScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: Container(
|
|
decoration: const BoxDecoration(
|
|
gradient: LinearGradient(
|
|
begin: Alignment.topCenter,
|
|
end: Alignment.bottomCenter,
|
|
colors: [Colors.purple, Colors.deepPurple],
|
|
),
|
|
),
|
|
child: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
const Text(
|
|
'Match Three',
|
|
style: TextStyle(
|
|
fontSize: 48,
|
|
fontWeight: FontWeight.bold,
|
|
color: Colors.white,
|
|
),
|
|
),
|
|
const SizedBox(height: 60),
|
|
ElevatedButton(
|
|
onPressed: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(builder: (context) => const GameScreen()),
|
|
);
|
|
},
|
|
style: ElevatedButton.styleFrom(
|
|
padding:
|
|
const EdgeInsets.symmetric(horizontal: 40, vertical: 16),
|
|
),
|
|
child: const Text('Start Game', style: TextStyle(fontSize: 20)),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|