-
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 |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| ## 0.8.3+1 | ||
| * Improve API docs and examples | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please follow the CHANGELOG style guide linked from the PR checklist.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not fully resolved; it should be "Improves", not "Improve", as shown in the style guide. |
||
|
|
||
| ## 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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not a file type, it's a list of possible file types. It would also be useful to give examples of how this will work on different platforms. E.g., on Windows each group will be an entry in a list of filter options, while on macOS (where there is no such UI, the union of all types allowed by all of the groups will be allowed.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This has not been resolved.
stuartmorgan-g marked this conversation as resolved.
Outdated
|
||
| /// When omitted, Open file dialog with all file types. | ||
|
stuartmorgan-g marked this conversation as resolved.
Outdated
|
||
| /// | ||
| /// 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
|
||
| /// When omitted, The result of each platform's `getDirectoryPath()` execution is used. | ||
|
stuartmorgan-g marked this conversation as resolved.
Outdated
|
||
| /// | ||
| /// 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
|
||
| /// | ||
| /// 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.
|
||
| 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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/he/the/ This also makes it sound like it forces a name. It's actually just the initial value of the name. |
||
| /// When omitted, use UUID(version4) as file name. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What? I have no idea what this is referring to. |
||
| /// | ||
| /// 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.