state property Null safety

StateNotifierProvider<GameStateNotifier<Event, Game<Event>>, GameOrError<Game<Event>>> state
final

Provides the GameStateNotifier based on the GameConfig from lobby's config

Implementation

static final StateNotifierProvider<GameStateNotifier, GameOrError> state =
    StateNotifierProvider<GameStateNotifier, GameOrError>(
  (ref) {
    final l = ref.watch(lobby);
    return GameStateNotifier(
      l.config,
      l.code,
      Game.getInitialState(l.config, l.players),
    );
  },
  name: 'BackendGameNotifier',
  dependencies: [lobby],
);