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.EMPTY_SUCCESS
      : ResourceStateEnum.SUCCESS;

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