createState method

  1. @override
CellState<StatefulCell> createState()

Create the CellState for this cell.

This method should be overridden by subclasses.

Implementation

@override
CellState<StatefulCell> createState() {
  if (_restoredState != null) {
    final state = _restoredState;
    _restoredState = null;

    return state!;
  }

  return SelfCellState<T>(
    cell: this,
    key: key,
  );
}