Dart API
Game modules use one package and one import:
import 'package:eigen_flutter/eigen_flutter.dart';
Open the latest eigen_flutter API reference on pub.dev →
The standard app composition root imports the complete shell and optional Firebase adapter:
import 'package:eigen_shell/eigen_shell.dart';
import 'package:eigen_firebase/eigen_firebase.dart';
Open the latest eigen_shell API reference on pub.dev →
Open the latest eigen_firebase API reference on pub.dev →
The public package surfaces are:
| Library | Use it for |
|---|---|
package:eigen_flutter/eigen_flutter.dart | Embeddable scope, configuration, the Dart GameModule / GameRules contract, domain vocabulary, and game-facing widgets. |
package:eigen_flutter/testing/twin_fixtures.dart | Running the shared TypeScript/Dart contract fixtures from flutter test. |
package:eigen_flutter/adapters.dart | Supported provider ports used by integration packages, not ordinary game code. |
package:eigen_shell/eigen_shell.dart | The standard application startup, routing, and complete first-party product. |
package:eigen_firebase/eigen_firebase.dart | Firebase initialization, provider overrides, explicit telemetry policy, and background-message types. |
Everything under the package's core/, features/, and shared/ directories
is implementation detail. Do not deep-import it. If a task guide asks you to
use a type that is missing from the barrel, that is an engine API bug.
Offline play
The Dart local unit surfaces through the same package a game already imports; there is no new dependency to add.
GameRules.local, inpackage:eigen_flutter/eigen_flutter.dart, returns a version's optionalLocalGameRulesunit, ornullfor a version that ships no on-device bots.eigen_codegen:generate_payloadsadditionally emits a<Game>V<N>Statepayload type and a<Game>V<N>LocalRulesBaseimplementing the seven codecsLocalGameRulesneeds, so a game supplies only its four hooks andbotActions.package:eigen_client— the pure-Dart runtimeeigen_flutterembeds — carries the local kernel and engine directly:LocalGameRules,EigenRng,LocalGameRecord,LocalGameStore,BotRunner, andLocalGameEngine. Game code never imports this package; the Flutter adapter wires it up.
See Offline play for how to implement one.
Guide versus API reference
Use this site to complete a task; use pub.dev to look up an exact constructor, member, or type:
- The contract explains what you implement on both the TypeScript and Dart sides.
- Rendering covers
GameContentContext, actions, optimistic preview, seats, and widget tests. - Creation UI covers
GameCreationSpecand the version-independent module UI. - Monetization covers
CommerceRepository,PurchaseGatewayandHostedStorefront, offers, entitlements, access, and commercial limits. - Testing covers the dedicated testing library.
eigen_api is the generated transport package used inside eigen_client.
Game apps do not depend on or import it directly. For wire-level lookup, use
the HTTP API reference or
openapi.json.
Versioned docs
The latest link follows the newest stable package. To inspect the API for a
version pinned in an older app, open that release from the
eigen_flutter versions list;
pub.dev keeps dartdoc for every published version.