eigen_flutter library
EigenInteractive — a whitelabel turn-based multiplayer game engine.
A game app depends on this package, implements a GameModule, and boots with runEngineApp:
import 'package:eigen_flutter/eigen_flutter.dart';
Future<void> main() => runEngineApp(
module: const MyGameModule(),
config: appConfig,
firebaseOptions: firebaseOptions,
onBackgroundMessage: onBackgroundMessage,
);
This library is the supported app import. It exposes the entry point, composition-root configuration, game contract, wire vocabulary, and shared game UI without exposing the app shell's repositories or transport.
Start with the EigenInteractive quickstart and use the task guides for end-to-end TypeScript and Dart examples.
Classes
- AppConfig
- Whitelabel configuration for one game app built on the engine.
- Bot
- BotSeatableArgs
- A candidate bot seating, passed to GameRules.botSeatable.
- BotTag
- Compact pill that labels a participant as a bot.
- Branding
- User-facing identity for the app shell.
- BudgetConfig
- Each player has a personal time bank that drains while they act (Fischer increment).
- EngineConfig
- Runtime configuration the framework needs to talk to its backends.
- Frame
- Friend
- FriendRequest
- GameContentContext
- Everything GameRules.buildContent needs, bundled into one object.
- GameCreationSpec
- Declarative description of what is valid when creating a game of this type.
- GameFrame
- A single observation snapshot of an active or finished game.
- GameModule
- Contract every game implementor provides.
- GamePlayer
- Unified game-level player concept.
-
GameRules<
TObs, TAction, TConfig> -
The client-side surface of one
schemaVersionof the game — the Dart twin of the same-named TSGameRulesunit. - GameSummary
- GuestTag
- Compact pill that labels a player as an anonymous guest.
- MyApp
- Root application widget shared by every game built on the engine.
- MySeat
- A sealed union of the two ways the current user relates to a game.
- Outcome
- PerActionConfig
- Each turn gets a fresh fixed window of minSeconds–maxSeconds.
- Player
- PlayerAvatar
- Circular avatar for a player, with customizable size.
- PlayersContext
- Player identity data passed to GameRules.buildContent.
- PlayerTimerBuilder
- Headless widget that computes a single player's remaining budget time, exposing it to a builder callback every second.
- Profile
- Rating
- RatingDelta
- RatingIdentity
- RatingPoolArgs
- The chosen game settings, passed to GameRules.ratingPool.
- Roster
- Seat
- Seated
- The current user holds seat index in the game (a participant).
- ServerClock
- Server time, as best the client can tell.
- TimingContext
- Timing data passed to GameRules.buildContent for every active game.
- TimingModeConfig
- Configuration for one timing option shown in the new-game dialog.
- TurnTimerBuilder
-
Headless widget that ticks toward a deadline, exposing the remaining
Durationto a builder callback every second. - UntimedConfig
- No time limit. Players act at any pace. No additional controls rendered.
- Viewer
- The current user has no seat — a non-participant viewing a replay.
Enums
- ActionSubmitResult
- How a submitted action resolved, reported to the game through the future returned by GameContentContext.onAction.
- ErrorCode
- A stable machine code identifying why a request failed.
- GameAccess
- GameStatus
- OutcomeResultEnum
- SeatTypeEnum
Constants
- kMaxBudgetSeconds → const int
- Infra hard maximum for budget (accumulated) clock (10 days).
- kMaxTurnSeconds → const int
- Infra hard maximum for per-action turn time (30 days).
- kMinBudgetSeconds → const int
- Infra hard minimum for budget (accumulated) clock (seconds).
- kMinTurnSeconds → const int
- Infra hard minimum for per-action turn time (seconds).
Properties
- appConfigProvider → AppConfigProvider
-
The active AppConfig.
final
- currentGameModuleProvider → CurrentGameModuleProvider
-
The active GameModule.
final
Functions
-
runEngineApp(
{required GameModule module, required AppConfig config, required FirebaseOptions firebaseOptions, required Future< void> onBackgroundMessage(RemoteMessage)}) → Future<void> - Boots a whitelabel game app on the engine.
Exceptions / Errors
- EngineException
-
A failure the engine server itself reported — a non-2xx response carrying
the
{ error, code? }envelope. - UnsupportedGameSchemaException
-
Thrown when a game's
games.schema_versionhas no entry in GameModule.versions — it was created by a newer app version (or one this build has retired) and can't be loaded until the user updates.