MyPicker class
系统文件/文件夹选择(非 MySelector)。
类名已表达「选择」语义,方法使用 dir / file / files,不再重复 pick 前缀。 dir 为系统目录选择对话框,不是 MyPaths.userDataDir 路径 getter。
详见 .doc/user_data_picker.md。
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
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
dir(
{String? initialDir, String confirmButtonText = '选择文件夹'}) → Future< String?> - 选择单个目录;取消返回 null。桌面为主。
-
file(
{String? initialDir, List< String> ? acceptedExtensions, String? confirmButtonText}) → Future<String?> - 选择单个文件;取消返回 null。
-
files(
{String? initialDir, List< String> ? acceptedExtensions, String? confirmButtonText}) → Future<List< String> > - 选择多个文件;取消或未选返回空列表。
-
resolveInitialDir(
String? initialDir) → String? -
解析系统对话框初始目录:显式
initialDir优先,否则已 MyPaths.setUserDataDir 时用 MyPaths.userDataDir。 -
userDataDirAndApply(
{required MyUserDataDirStore store, String? initialDir, Future< bool> confirmWarnings(List<String> warnings)?, Future<void> onAfterApply(String normalizedPath)?, String confirmButtonText = '选择文件夹'}) → Future<String?> - 系统选目录 → 可选 warnings 确认 → MyUserDataDirSession.apply。