get<S extends AppService> static method
Implementation
static S get<S extends AppService>(BuildContext context) {
var services = of<S>(context);
var _services = services!.container.services.whereType<S>();
if (_services.isEmpty) throw 'no service of type $S found';
return _services.first;
}