clear method

void clear({
  1. bool notify = true,
})

Implementation

void clear({bool notify = true}) {
  if (_value is Map) {
    (_value as Map).clear();
  } else if (_value is List) {
    (_value as List).clear();
  } else {
    throw Exception('Cannot clear not a map or list');
  }
  if (notify) notifyListeners();
}