zone top-level property
ZoneManager
get
zone
Gets the global zone manager.
Must call initGlobalZone first, otherwise throws a StateError.
Example
void main() {
initGlobalZone();
// Now you can use zone.mark(), zone.scan(), zone.get()
runProgram(MyModel());
}
Implementation
ZoneManager get zone {
final z = _globalZone;
if (z == null) {
throw StateError(
'Global zone manager not initialized. Call initGlobalZone() first.',
);
}
return z;
}