startGame method

  1. @override
Future<bool> startGame(
  1. PlayerID playerID,
  2. GameCode code
)
override

Sends a start event to the game server

Implementation

@override
Future<bool> startGame(PlayerID playerID, GameCode code) async {
  final backendReader = NoServerClient.games[code]!.container.read;
  final notifier = backendReader(BackendProviders.lobby.notifier);
  await Future.delayed(const Duration(microseconds: 1));
  notifier.start();
  return true;
}