current property
RuntimeContext
get
current
The current RuntimeContext available to the executing application.
Resolution order:
- Whatever was installed via install (typically the
build_runner-generated
bootstrap()). - Whatever was registered via registerDefaultContextFactory.
- The mirror-based
MirrorContextifdart:mirrorsis available (JIT execution); otherwise aStateError(AOT execution).
Implementation
static RuntimeContext get current =>
_installed ??= _resolveDefaultContext();