gameServiceFamily top-level property
Provides the GameService
for each service id
Implementation
final gameServiceFamily = Provider.family<GameService, ServiceType>(
(ref, serviceType) {
switch (serviceType) {
case OnDeviceService:
return ref.watch(onDeviceGameService);
default:
throw UnsupportedError('Unsupported service type');
}
},
name: 'GameServiceFamily',
dependencies: [onDeviceGameService, playerIDProvider],
);