stateOf<T extends StatefulWidget> method

  1. @override
StateX<StatefulWidget>? stateOf<T extends StatefulWidget>()
override

Retrieve the State object by its StatefulWidget. Returns null if not found.

Implementation

@override
StateX? stateOf<T extends StatefulWidget>() {
  final state = super.stateOf<T>();
  return state == null ? null : state as StateX;
}