match_magic/lib/game/match_magic_game.dart

23 lines
571 B
Dart

import 'package:flame/components.dart';
import 'package:flame/game.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'board.dart';
import 'swap_notifier.dart';
class MatchMagicGame extends StatelessWidget {
final List<Sprite> sprites;
const MatchMagicGame({required this.sprites, Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return ChangeNotifierProvider(
create: (_) => SwapNotifier(),
child: GameWidget(
game: Board(sprites: sprites),
),
);
}
}