remove method

Future<void> remove(
  1. Object keys
)

Removes one or more items from storage. keys A single key or a list of keys for items to remove. returns Promise that resolves on success, or rejects on failure.

Implementation

Future<void> remove(Object keys) async {
  await _wrapped
      .remove(switch (keys) {
        String() => keys.toJS,
        List() => keys.toJSArrayString(),
        _ => throw UnsupportedError(
            'Received type: ${keys.runtimeType}. Supported types are: String, List<String>')
      })
      .toDart;
}