getInfo method

Get the storage information from the system. The argument passed to the callback is an array of StorageUnitInfo objects.

Implementation

Future<List<StorageUnitInfo>> getInfo() async {
  var $res =
      await promiseToFuture<JSArray>($js.chrome.system.storage.getInfo());
  return $res.toDart
      .cast<$js.StorageUnitInfo>()
      .map((e) => StorageUnitInfo.fromJS(e))
      .toList();
}