ScopeBuilder
Rebuilds a subtree when its nearest Scope changes or its value notifies.
Learn more: State management
Import: package:fleury/fleury.dart, or package:fleury/fleury_core.dart in browser code.
ScopeBuilder<Project>( builder: (context, project) => Text('Project: ${project.name}'),)Details
Section titled “Details”The widget form of BuildContext.scope: it reads exactly what
context.scope<T>() reads and subscribes the same way, but rebuilds only
this builder rather than the enclosing widget. A nullable type argument
(ScopeBuilder<Model?>) makes the scope optional. The scope keeps
ownership of its value.
Constructors
Section titled “Constructors”ScopeBuilder()
Section titled “ScopeBuilder()”| Parameter | Type | Default | Description |
|---|---|---|---|
builder: | Widget Function(BuildContext context, T value) | required | Builds from the nearest scoped value whenever it changes or notifies. |
Source
Section titled “Source”ScopeBuilder is defined in packages/fleury/lib/src/widgets/scope.dart.
Category: State & async · All widgets