serverClientFamily property
Provides the ServerClient
for each client id
Implementation
static final serverClientFamily = Provider.family<ServerClient, ClientType>(
(ref, clientType) {
switch (clientType) {
case IOClient:
return ref.watch(socketIOGameServerClient);
case OnDeviceClient:
return ref.watch(onDeviceGameServerClient);
default:
throw UnsupportedError('Unsupported client type');
}
},
name: 'ServerClientFamily',
dependencies: [
socketIOGameServerClient,
onDeviceGameServerClient,
playerID
],
);