firstState property

  1. @override
StateX<StatefulWidget>? get firstState
override

Return the first State object

Implementation

@override
StateX? get firstState {
  var state = super.firstState;
  if (state != null) {
    assert(state is! AppStateX,
    "Replace getter, 'firstState', with 'appState'.\nIn Fluttery, AppStateX is not type, StateX.");
    if (state is AppStateX) {
      state = null; // In Fluttery, AppStateX is not a subtype of this StateX
    }
  }
  return state == null ? null : state as StateX;
}