remove method Null safety

  1. @override
dynamic remove(
  1. Object? key
)
override

Removes key and its associated value, if present, from the map.

Returns the value associated with key before it was removed. Returns null if key was not in the map.

Note that some maps allow null as a value, so a returned null value doesn't always mean that the key was absent.

Implementation

@override
dynamic remove(Object? key) {
  final value = _data!.remove(key);
  persist();
  return value;
}