Flutter
BuildContext access
Choose subscribed or one-off access to the nearest Ark DI Scope.
v0.1.0-dev.1Intermediateark_di_flutter
BuildContext access
| API | Subscribes to Scope identity | Missing Scope |
|---|---|---|
context.di | yes | throws |
context.maybeDi | yes | returns null |
context.readDi | no | throws |
context.maybeReadDi | no | returns null |
Use subscribed access from build and didChangeDependencies. Use one-off access in event handlers where a container replacement should not rebuild the widget.