current property
ServiceResolver
current
Returns the current zones ServiceResolver.
A service resolver is usually provided to the zone by the applications ServiceHost.
See: ApplicationHost TestHost
Implementation
static ServiceResolver get current {
final resolver = Zone.current[#serviceResolver];
if (resolver is ServiceResolver) {
return resolver;
} else {
throw Exception('No service resolver registered in current zone.');
}
}