getOrigins method

Gets the origins currently using either the Application Cache or Web SQL Database APIs.

Implementation

Future<List<AndroidWebStorageOrigin>> getOrigins() async {
  List<AndroidWebStorageOrigin> originsList = [];

  List<WebStorageOrigin> origins =
      await WebStorageManager.instance().getOrigins();

  for (var origin in origins) {
    originsList.add(AndroidWebStorageOrigin(
        origin: origin.origin, quota: origin.quota, usage: origin.usage));
  }

  return originsList;
}