dataObject property
This is of type Object allowing you to propagate any class object you wish down the widget tree.
Implementation
Object? get dataObject => rootState?._dataObj;
Assign an object to the property, dataObject. It will not assign null and if SetState objects are implemented, will call the App's InheritedWidget to be rebuilt and call its dependencies.
Implementation
set dataObject(Object? object) {
// Never explicitly set to null
if (object != null) {
final state = rootState;
state?._dataObj = object;
// Call inherited widget to 'rebuild' any dependencies
state?.notifyClients();
}
}