-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[file_selector]Improve API docs and examples #4824
Changes from 9 commits
6c71647
b021530
a6cc58f
08a3dea
2b391d6
fe10180
09d9bf8
a3a820d
422b133
63bbfe8
55bd1a5
d51b01c
cbed80f
d9dc0bc
229657d
d190b51
c31eea7
750f8b7
ef47a7a
e0eac1a
bbe266d
bd4e16b
fda0ed5
e982e74
28fe8a4
93a87a5
73d596e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,3 +63,4 @@ Aleksandr Yurkovskiy <[email protected]> | |
Anton Borries <[email protected]> | ||
Alex Li <[email protected]> | ||
Rahul Raj <[email protected]> | ||
TowaYamashita <[email protected]> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
## 0.8.3+1 | ||
* Improve API docs and examples | ||
|
||
|
||
## 0.8.3 | ||
|
||
* Adds an endorsed Windows implementation. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,18 @@ export 'package:file_selector_platform_interface/file_selector_platform_interfac | |
show XFile, XTypeGroup; | ||
|
||
/// Open file dialog for loading files and return a file path | ||
/// | ||
/// The [acceptedTypeGroups] argument is the file type that can be selected in the dialog. | ||
|
||
/// When omitted, Open file dialog with all file types. | ||
stuartmorgan-g marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
/// | ||
/// The [initialDirectory] argument is directory that will be displayed when the dialog is opened. | ||
/// (NOTICE: specify a directory as a full path, not a relative path.) | ||
stuartmorgan-g marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
/// When omitted, The result of each platform's `getDirectoryPath()` execution is used. | ||
stuartmorgan-g marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
/// | ||
/// The [confirmButtonText] argument is the text in the confirmation button of the dialog. | ||
/// When omitted, the wording specified in the OS standard is used.(e.g. open) | ||
stuartmorgan-g marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
/// | ||
/// Returns `null` if user cancels the operation. | ||
Future<XFile?> openFile({ | ||
List<XTypeGroup> acceptedTypeGroups = const <XTypeGroup>[], | ||
String? initialDirectory, | ||
|
@@ -22,6 +34,16 @@ Future<XFile?> openFile({ | |
} | ||
|
||
/// Open file dialog for loading files and return a list of file paths | ||
/// | ||
/// The [acceptedTypeGroups] argument is the file type that can be selected in the dialog. | ||
/// When omitted, Open file dialog with all file types. | ||
/// | ||
/// The [initialDirectory] argument is directory that will be displayed when the dialog is opened. | ||
/// (NOTICE: specify a directory as a full path, not a relative path.) | ||
/// When omitted, The result of each platform's `getDirectoryPath()` execution is used. | ||
/// | ||
/// The [confirmButtonText] argument is the text in the confirmation button of the dialog. | ||
/// When omitted, the wording specified in the OS standard is used.(e.g. open) | ||
Future<List<XFile>> openFiles({ | ||
stuartmorgan-g marked this conversation as resolved.
Show resolved
Hide resolved
|
||
List<XTypeGroup> acceptedTypeGroups = const <XTypeGroup>[], | ||
String? initialDirectory, | ||
|
@@ -34,6 +56,21 @@ Future<List<XFile>> openFiles({ | |
} | ||
|
||
/// Saves File to user's file system | ||
/// | ||
/// The [acceptedTypeGroups] argument is the file type that can be selected in the dialog. | ||
/// When omitted, Open file dialog with all file types. | ||
/// | ||
/// The [initialDirectory] argument is directory that will be displayed when the dialog is opened. | ||
/// (NOTICE: specify a directory as a full path, not a relative path.) | ||
/// When omitted, The result of each platform's `getDirectoryPath()` execution is used. | ||
/// | ||
/// The [suggestedName] argument is he name of the file to save. | ||
|
||
/// When omitted, use UUID(version4) as file name. | ||
|
||
/// | ||
/// The [confirmButtonText] argument is the text in the confirmation button of the dialog. | ||
/// When omitted, the wording specified in the OS standard is used.(e.g. open) | ||
/// | ||
/// Returns `null` if user cancels the operation. | ||
Future<String?> getSavePath({ | ||
List<XTypeGroup> acceptedTypeGroups = const <XTypeGroup>[], | ||
String? initialDirectory, | ||
|
@@ -48,6 +85,15 @@ Future<String?> getSavePath({ | |
} | ||
|
||
/// Gets a directory path from a user's file system | ||
/// | ||
/// The [initialDirectory] argument is directory that will be displayed when the dialog is opened. | ||
/// (NOTICE: specify a directory as a full path, not a relative path.) | ||
/// When omitted, The result of each platform's `getDirectoryPath()` execution is used. | ||
/// | ||
/// The [confirmButtonText] argument is the text in the confirmation button of the dialog. | ||
/// When omitted, the wording specified in the OS standard is used.(e.g. open) | ||
/// | ||
/// Returns `null` if user cancels the operation. | ||
Future<String?> getDirectoryPath({ | ||
String? initialDirectory, | ||
String? confirmButtonText, | ||
|
Uh oh!
There was an error while loading. Please reload this page.