setRootStateX method
Important to record the 'root' StateX object. Its an InheritedWidget!
Implementation
bool setRootStateX(StateX state) {
// This can only be called once successfully. Subsequent calls are ignored.
// Important to prefix with the class name to 'share' this as a mixin.
final set = RootState._rootStateX == null && state is AppStateX;
if (set) {
// Important to prefix with the class name to 'share' this as a mixin.
RootState._rootStateX = state;
}
return set;
}