23 lines
608 B
Dart
23 lines
608 B
Dart
import 'package:flame/game.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:match_magic/models/game_state.dart';
|
|
import 'package:match_magic/game/match_magic_game.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
class GameScreen extends StatelessWidget {
|
|
const GameScreen({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: Consumer<GameState>(
|
|
builder: (context, gameState, child) {
|
|
return GameWidget<MatchMagicGame>(
|
|
game: MatchMagicGame(gameState),
|
|
);
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|