flame_gallery 0.1.0
flame_gallery: ^0.1.0 copied to clipboard
Drop-in, brandable 2D mini games (slice, endless runner, match-3, rhythm) for any Flutter app, opened with one FlameGallery.show call.
flame_gallery example #
import 'package:flame_gallery/flame_gallery.dart';
import 'package:flutter/material.dart';
Future<void> playCampaign(BuildContext context) async {
final result = await FlameGallery.show(
context,
game: FruitSlice(
config: const SliceConfig(timeLimit: Duration(seconds: 30), bomb: null),
strings: FruitSlice.stringsTr,
),
onEvent: (event) => debugPrint('$event'),
);
if (result != null && result.score >= 50) {
// Grant the coupon.
}
}
A full demo app with every game lives in apps/example.
