removeItem method

void removeItem(
  1. String key
)

Removes the entry for key from the state data map.

Implementation

void removeItem(String key) {
  state = state.copyWith(
      data: {
    ...state.data,
  }..remove(key));
  saveState();
}