offline_games library

A pure-Flutter package providing a zero-config mini arcade when offline.

Classes

BreakoutGame
Offline implementation of the retro Breakout brick-breaker arcade game.
ConnectivitySource
Contract for checking and observing true internet reachability.
CrtScanlinesOverlay
An authentic retro CRT scanline and vignette overlay for vintage screens.
DefaultConnectivitySource
Default ConnectivitySource implementation using an isolated InternetConnection instance.
GameAuthor
Represents an author or contributor of an offline game.
GameCatalog
Built-in registry of official games shipped with offline_games.
GameMeta
Metadata describing an offline game.
GamePicker
Standalone arcade catalog grid widget letting players choose a mini-game, styled with authentic retro 8-bit pixel vector cards.
GamePlayer
Standalone widget to play an OfflineGame directly within any app view.
GameSession
Active game session injected into each OfflineGame by the host.
GamesMode
Presentation mode determining how offline games are chosen or launched.
GameSpinner
Standalone animated arcade wheel / slot spinner widget in Vintage CRT theme.
MemoryMatchGame
Offline implementation of the Memory Match card pairing mini-game.
MemoryScoreStore
Default in-memory implementation of ScoreStore.
OfflineGame
Contract that every standalone offline mini-game must implement.
OfflineGames
Wraps your application to provide a plug-and-play mini-arcade when offline.
OfflineGamesController
Controller allowing host applications to inspect and manipulate the offline games UI.
OfflineGamesTheme
Theming options for the offline arcade cards, frames, and spinners, defaulting to the authentic Vintage Screen Pixel Vectors aesthetic.
PickerMode
Catalog picker mode.
PixelGlyphWidget
A standalone widget that renders an 8x8 retro vector pixel glyph.
PixelText
A pure vector-based 5x7 arcade pixel font renderer with zero external dependencies.
RetroCloseButton
A vintage 8-bit styled retro close button displaying pixel text and frame.
RetroCloudSweep
A Clash of Clans-inspired retro cloud sweep transition.
RetroPixelButton
A chunky 8-bit pushable arcade button with authentic stepped press mechanics.
RetroPixelCard
A vintage 8-bit arcade card with hard stepped pixel drop-shadows and solid border.
ScoreStore
Storage contract for saving and loading player game scores.
SingleMode
Single targeted game mode.
SnakeGame
Offline implementation of the retro Snake arcade game.
SpinMode
Random spin mode.

Enums

OfflineTrigger
Defines how the offline games prompt or overlay is triggered.
PixelGlyphType
Available 8-bit retro pixel vector glyphs for arcade games and cards.

Functions

pickRandomGame({required List<OfflineGame> games, OfflineGame? previous, required Random random}) → OfflineGame
Helper to select a random game while guaranteeing that the same game is never picked twice consecutively if more than one game is available.
showGameCredits(BuildContext context, GameMeta meta) → Future<void>
Displays the author attribution and credits sheet for an OfflineGame, styled in the vintage arcade hall of fame aesthetic.
showOfflineGames(BuildContext context, {List<OfflineGame>? games, GamesMode mode = const GamesMode.spin(), ScoreStore? scoreStore, ConnectivitySource? connectivity, OfflineGamesTheme? theme, ThemeMode themeMode = ThemeMode.system}) → Future<void>
Manually displays the offline arcade UI inside a full-screen modal page route.