Fruit Slice
Swipe to slice, chain combos, avoid bombs.
FruitSlice()
Fruit Slice, an endless runner, a match-3 puzzle and a rhythm game, ready to drop into any app. Brand them with your colors, art and texts; get the score back for coupons, points or analytics.
Four classic 2D mechanics, each its own package, all sharing menus, pause handling and results.
Swipe to slice, chain combos, avoid bombs.
FruitSlice()
Three lanes. Swipe, jump, slide, collect coins.
EndlessRunner()
Match three or more, trigger cascades.
SweetSwap()
Tap the lanes on the beat. Perfect, Great, Good.
NoteRush()
FlameGallery.show opens a full screen game with start, pause and game over menus and completes with a GameResult.
Color scheme, font, logo, background (color, gradient or image), every text, sprites and rules are config. No colors given? The game follows your app theme.
Timers, lives, move limits, target scores and seeded "daily" boards, plus stats in every result.
Library packages depend only on flutter and flame. No state management or codegen forced on your app.
Stable Semantics ids on every button and HUD value. A Maestro suite plays every game on iOS and Android.
Build your own game on flame_gallery_core; menus, theming, pause and results come for free.
Add the package, call show, use the result.
1 · Install
flutter pub add flame_gallery
2 · Open a game
import 'package:flame_gallery/flame_gallery.dart'; final result = await FlameGallery.show( context, game: const SweetSwap( config: MatchConfig(moveLimit: 15, targetScore: 1000), ), onEvent: (event) => analytics.log('$event'), );
3 · Reward the player
if (result case GameResult( isCompleted: true, :final score, ) when score >= 1000) { grantCoupon(); } // result.toJson() // {gameId: sweet_swap, score: 1040, reason: completed, // playTimeMs: 48210, stats: {movesUsed: 12, maxCascade: 3, // endedBy: target}}
Events: GameStarted, GameScoreChanged, GamePaused, GameResumed, GameFinished.
Every game takes a theme, texts and its own rules. Swap the fruit for your products.
FruitSlice( theme: GameTheme( colorScheme: ColorScheme.fromSeed( seedColor: brandTeal, brightness: Brightness.dark, ), logo: const AssetImage('assets/logo.png'), ), strings: FruitSlice.stringsTr.copyWith( title: 'Yaz Kampanyası', ), config: SliceConfig( timeLimit: const Duration(seconds: 30), items: [ SliceItem( sprite: const GameAsset('assets/can.png'), juiceColor: brandRed, points: 2, ), ], bomb: null, ), )
| Game | Config highlights |
|---|---|
FruitSlice | timeLimit, lives, items, bomb, difficulty |
EndlessRunner | timeLimit, lives, coinValue, sprites |
SweetSwap | rows, columns, moveLimit, targetScore, seed |
NoteRush | song, difficulty, missLimit, pluggable RhythmAudio |
All games ship English and Turkish texts. Your art goes in with GameAsset('assets/...').
Backgrounds, your own dialogs and HUD, animated characters and sound effects, all without forking a game.
FlameGallery.show( context, game: FruitSlice( theme: GameTheme( background: const GameBackground.gradient( LinearGradient(colors: [teal900, teal500]), ), themeData: myAppTheme, ), ), // replace any built-in overlay overlays: GameOverlayBuilders( start: (context, ui) => MyBrandDialog(onStart: ui.start), gameOver: (context, ui) => MyResultSheet(onClose: ui.close), ), // your audio package plays the cues sounds: CallbackSounds((cue) => player.play(cue.name)), );
| You want | You use |
|---|---|
| Color, gradient or image behind the game | GameTheme(background:) |
| Your design system in menus | GameTheme(themeData:), GameOverlayBuilders |
| Animated runner or coin | GameAnimation via RunnerSprites |
| Sound effects | GameSounds / GameSoundCue (no audio dependency) |
| Custom difficulty numbers | SliceDifficulty.normal.copyWith(...) |