Flutter

BuildContext access

Choose subscribed or one-off access to the nearest Ark DI Scope.

v1.1.0Intermediateark_di_flutter

BuildContext access

APISubscribes to Scope identityMissing Scope
context.diyesthrows
context.maybeDiyesreturns null
context.readDinothrows
context.maybeReadDinoreturns null

Use subscribed access from build and didChangeDependencies. Use one-off access in event handlers where a container replacement should not rebuild the widget.