PublicFileSaverWeb class
Web implementation of PublicFileSaverPlatform.
Both saveBytes and saveBytesWithDialog trigger a standard browser download. The browser decides where the file goes (typically the user's configured Downloads folder, or it prompts the user if "Ask where to save each file" is enabled).
The returned PublicSavedFile only contains PublicSavedFile.fileName because the actual save location is not exposed to JavaScript for privacy reasons.
- Inheritance
-
- Object
- PlatformInterface
- PublicFileSaverPlatform
- PublicFileSaverWeb
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
saveBytes(
{required Uint8List bytes, required String fileName, String mimeType = 'application/octet-stream', String? subDir}) → Future< PublicSavedFile?> -
Save bytes to a public visible location without showing a dialog.
override
-
saveBytesWithDialog(
{required Uint8List bytes, required String fileName, String mimeType = 'application/octet-stream', List< String> ? fileSuffixChoices}) → Future<PublicSavedFile?> -
Save bytes to a user-selected location via system file picker dialog.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
registerWith(
Registrar registrar) → void