fluttertpc_flutter_document_picker:基于 Flutter 的文档选择器项目

暂无描述

分支1Tags3
文件最后提交记录最后更新时间
3 个月前
3 年前
1 年前
3 年前
3 年前
1 年前
3 年前
1 个月前
3 年前
1 年前
7 年前
2 年前
1 个月前
1 个月前
1 年前
3 年前
3 个月前
2 年前

flutter_document_picker

本项目基于 flutter_document_picker 开发。

1. 安装与使用

1.1 安装方式

进入到工程目录并在 pubspec.yaml 中添加以下依赖:

pubspec.yaml

...

dependencies:
  flutter_document_picker:
    git:
      url: https://gitcode.com/CPF-Flutter/fluttertpc_flutter_document_picker.git
      # ref: 5.2.3-ohos-1.0.0
      ref: x.x.x-ohos-x.x.x # Please select the TAG to the TAG Version Mapping
...

执行命令

flutter pub get

TAG 版本对应表

Flutter 框架版本 TAG 分支
3.7/3.22/3.27/3.35 5.2.3-ohos-1.0.0 master

1.2 使用案例

使用案例详见 example

2. 约束与限制

2.1 兼容性

在以下版本中已测试通过

  1. Flutter: 3.7.12-ohos-1.1.3; SDK: 5.0.0(12); IDE: DevEco Studio: 5.1.0.828; ROM: 5.1.0.130 SP8;
  2. Flutter: 3.22.1-ohos-1.0.3; SDK: 5.0.0(12); IDE: DevEco Studio: 5.1.0.828; ROM: 5.1.0.130 SP8;
  3. Flutter: 3.35.8-ohos-0.0.1; SDK: 6.0.2(22); IDE: DevEco Studio: 6.0.2.640; ROM: 6.0.0.130 SP15;

3. API

"ohos Support"列为 yes 表示 ohos 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。

Name Description Type Input Output ohos Support
openDocument 选择单个文档文件 function FlutterDocumentPickerParams? params Future<String?> yes
openDocuments 选择多个文档文件 function FlutterDocumentPickerParams? params Future<List<String?>?> yes

4. 属性

"ohos Support"列为 yes 表示 ohos 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。

FlutterDocumentPickerParams

Name Description Type ohos Support
allowedUtiTypes 在 iOS 中使用 Uniform Type Identifiers 来检查文档类型(仅限 iOS) List? no
allowedFileExtensions 所选文件应具有的文件扩展名列表。如果列表为 null 或空,则不会检查所选文档的扩展名 List? yes
allowedMimeTypes 文档选择器中仅显示具有所提供 MIME 类型的文件。如果列表为 null 或空,则使用 / MIME 类型 List? yes
invalidFileNameSymbols 在选定文档名称中会被替换为 "_" 的符号列表 List yes

5. 遗留问题

6. 其它

7. 开源协议

本项目基于 Apache-2.0 ,请自由地享受和参与开源。