setData method

void setData(
  1. SetDataFunction fn
)

Implementation

void setData(SetDataFunction fn) {
  final newState = fn(data);
  data = newState;
  log('setData: $data');
  notifyListeners();
}