getBytesInUse method
Gets the amount of space (in bytes) being used by one or more items.
keys A single key or list of keys to get the total usage for. An empty
list will return 0. Pass in null to get the total usage of all of
storage.
returns Promise that resolves with the amount of space being used by
storage, or rejects on failure.
Implementation
Future<double> getBytesInUse(Object? keys) async {
var $res = await _wrapped
.getBytesInUse(switch (keys) {
String() => keys.toJS,
List() => keys.toJSArrayString(),
null => null,
_ => throw UnsupportedError(
'Received type: ${keys.runtimeType}. Supported types are: String, List<String>')
})
.toDart;
return $res.toDartDouble;
}