add method

void add(
  1. S data, {
  2. bool notify = true,
})

Implementation

void add(S data, {bool notify = true}) {
  final newState = (data is List && data.isEmpty) || data == null
      ? ResourceStateEnum.emptySuccess
      : ResourceStateEnum.success;

  _updateState(data: data, state: newState, notify: notify);
}