lastState property
Return the 'latest' State object
Implementation
@override
StateX? get lastState {
var state = super.lastState;
if (state != null) {
assert(() {
if (state is AppStateX) {
debugPrint(
"Replace getter, 'lastState', with 'appState'.\nIn Fluttery, AppStateX is not type, StateX.");
}
return true;
}());
if (state is AppStateX) {
state = null; // In Fluttery, AppStateX is not a subtype of this StateX
}
}
return state == null ? null : state as StateX;
}