FileSelectorPlatform class abstract

The interface that implementations of file_selector must implement.

Platform implementations should extend this class rather than implement it as file_selector does not consider newly added methods to be breaking changes. Extending this class (using extends) ensures that the subclass will get the default implementation, while platform implementations that implements this interface will be broken by newly added FileSelectorPlatform methods.

Inheritance
  • Object
  • PlatformInterface
  • FileSelectorPlatform

Constructors

FileSelectorPlatform()
Constructs a FileSelectorPlatform.

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.
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 Properties

instance FileSelectorPlatform
The default instance of FileSelectorPlatform to use.
getter/setter pair