Flutter

Root and child Scope

Attach an application container and create bounded child containers in the widget tree.

v1.1.0Intermediateark_di_flutter

Root and child Scope

DiRootScope accepts an existing container. With DiScopeOwnership.owned it closes that container when replaced or disposed; with external, the caller remains responsible.

DiScope requires a one-shot configure callback and creates a child under the nearest scope. When the parent identity changes, it builds a new child and closes the previous one.

Use a new widget key when changed configuration must create a new Scope. The callback is not a mutable registration API.