FlutterInheritedModel constructor
const
FlutterInheritedModel({})
An annotation that designates a model class to be generated as an InheritedModel widget.
A class with this annotation will have code automatically generated by build_runner
for a widget that inherits from InheritedModel and for related state management.
Example:
@FlutterInheritedModel(name: 'MyDataModel')
class MyModel with $MyModel {
MyModel._();
factory MyModel() = _$MyModel;
// ...
}
Implementation
const FlutterInheritedModel({
this.name,
this.useLifecycleState = false,
this.useAsyncWorker = false,
this.useSingleTickerProvider = false,
this.useTickerProvider = false,
this.event,
});