key method

Future<String> key({
  1. required int index,
})

When passed a number index, returns the name of the nth key in a given Storage object. The order of keys is user-agent defined, so you should not rely on it.

Implementation

Future<String> key({required int index}) async {
  var result = await _controller.evaluateJavascript(source: """
  window.$webStorageType.key($index);
  """);
  return result != null ? json.decode(result) : null;
}