state property
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.toIList()),
);
},
name: 'BackendGameNotifier',
dependencies: [lobby],
);