gameClientFamily property
Provides a GameClient
for the client with the specified id
Implementation
static final gameClientFamily = Provider.family<GameClient, ClientType>(
(ref, clientType) {
switch (clientType) {
case IOClient:
return ref.watch(socketIOGameClient);
case OnDeviceClient:
return ref.watch(onDeviceGameClient);
default:
throw UnsupportedError('Unsupported client type');
}
},
name: 'GameClientFamily',
dependencies: [socketIOGameClient, onDeviceGameClient, playerID],
);