fromStateMap<Model, Prop> method
FFDynamicModel<Model>
fromStateMap<Model, Prop>(
- BuildContext context,
- Map<
String, Prop> stateMap(- Watched state
- Model build(
- Prop prop
Implementation
FFDynamicModel<Model> fromStateMap<Model, Prop>(
BuildContext context,
Map<String, Prop> Function(Watched state) stateMap,
Model Function(Prop prop) build,
) => FFDynamicModel(
allowedKeys: stateMap(_state.watched(context)).keys.toList(),
build: (key, context) => build(stateMap(_state.watched(context))[key] as Prop),
);