WebScopedStorageXFileCreationParams.fromBytes constructor
WebScopedStorageXFileCreationParams.fromBytes(
- Uint8List bytes, {
- String? fileName,
- bool autoRevokeObjectUrl = true,
- @visibleForTesting Object? testOverrides,
Constructs a WebScopedStorageXFileCreationParams by creating a Blob
from bytes.
Creates an Object URL from the Blob created from the provided bytes.
See URL.createObjectURL.
If a fileName is provided, the underlying Blob is created as a File
with the fileName passed to it.
autoRevokeObjectUrl: Whether the created object url should be revoked
when this instance is garbage collected. See URL.revokeObjectURL.
This is a stub for the method in web_scoped_storage_cross_file.dart.
Implementation
factory WebScopedStorageXFileCreationParams.fromBytes(
// ignore: avoid_unused_constructor_parameters
Uint8List bytes, {
// ignore: avoid_unused_constructor_parameters
String? fileName,
// ignore: avoid_unused_constructor_parameters
bool autoRevokeObjectUrl = true,
// The type should be a `XFileTestOverrides`. It can't be imported in this
// stub without breaking other platforms.
// ignore: avoid_unused_constructor_parameters
@visibleForTesting Object? testOverrides,
}) => throw UnsupportedError(
'`WebScopedStorageXFileCreationParams.fromBytes` is only supported on web.',
);