getUsageForOrigin method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'WebStorage.getUsageForOrigin', apiUrl: 'https://developer.android.com/reference/android/webkit/WebStorage#getUsageForOrigin(java.lang.String,%20android.webkit.ValueCallback%3Cjava.lang.Long%3E)')])
Future<int> getUsageForOrigin({
  1. required String origin,
})

Gets the amount of storage currently being used by both the Application Cache and Web SQL Database APIs by the given origin. The amount is given in bytes and the origin is specified using its string representation.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • origin: all platforms

Use the PlatformWebStorageManager.isMethodSupported method to check if this method is supported at runtime.

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(
      apiName: 'WebStorage.getUsageForOrigin',
      apiUrl:
          'https://developer.android.com/reference/android/webkit/WebStorage#getUsageForOrigin(java.lang.String,%20android.webkit.ValueCallback%3Cjava.lang.Long%3E)',
    ),
  ],
)
Future<int> getUsageForOrigin({required String origin}) {
  throw UnimplementedError(
    'getUsageForOrigin is not implemented on the current platform',
  );
}