23 lines
571 B
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),
|
|
),
|
|
);
|
|
}
|
|
}
|