restoreState method

  1. @override
void restoreState(
  1. Object? state,
  2. CellValueCoder coder
)
inherited

Restore the state of the cell.

state is a value, previously returned by dumpState, encoding the state of the cell. This method should restored the state of the cell to the state described by state

coder is the CellValueCoder object which should be used for decoding the cell's value.

Implementation

@override
void restoreState(Object? state, CellValueCoder coder) {
  final restoredState = this.state ?? createState() as DynamicComputeCellState<T>;
  restoredState.restoreValue(coder.decode(state));

  _restoredState = restoredState;
}