FileSelectorWeb class

The web implementation of FileSelectorPlatform.

This class implements the package:file_selector functionality for the web.

Inheritance
  • Object
  • PlatformInterface
  • FileSelectorWeb

Constructors

FileSelectorWeb({@visibleForTesting DomHelper? domHelper})
Default constructor, initializes _domHelper that we can use to interact with the DOM. overrides parameter allows for testing to override functions

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

getDirectoryPath({String? initialDirectory, String? confirmButtonText}) → Future<String?>
Opens a file dialog for loading directories and returns a directory path.
getDirectoryPaths({String? initialDirectory, String? confirmButtonText}) → Future<List<String>>
Opens a file dialog for loading directories and returns multiple directory paths.
inherited
getDirectoryPathsWithOptions(FileDialogOptions options) → Future<List<String>>
Opens a file dialog for loading directories and returns multiple directory paths.
inherited
getDirectoryPathWithOptions(FileDialogOptions options) → Future<String?>
Opens a file dialog for loading directories and returns a directory path.
inherited
getSaveLocation({List<XTypeGroup>? acceptedTypeGroups, SaveDialogOptions options = const SaveDialogOptions()}) → Future<FileSaveLocation?>
Opens a file dialog for saving files and returns a file location at which to save.
getSavePath({List<XTypeGroup>? acceptedTypeGroups, String? initialDirectory, String? suggestedName, String? confirmButtonText}) → Future<String?>
Opens a file dialog for saving files and returns a file path at which to save.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openFile({List<XTypeGroup>? acceptedTypeGroups, String? initialDirectory, String? confirmButtonText}) → Future<XFile?>
Opens a file dialog for loading files and returns a file path.
openFiles({List<XTypeGroup>? acceptedTypeGroups, String? initialDirectory, String? confirmButtonText}) → Future<List<XFile>>
Opens a file dialog for loading files and returns a list of file paths.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

registerWith(Registrar registrar) → void
Registers this class as the default instance of FileSelectorPlatform.