Android使用java多线程实现,避免了数据较多时主线程溢出造成ui卡死的问题 目前仅实现了Android ,ios 和 web的支持 在后续版本添加 ,ios可先选用 file_picker 这个三方插件

Android uses java multi-threading to avoid the problem of UI stuck due to overflow of the main thread when there are too many data At present, only support for Android, ios and web is implemented. Adding in subsequent versions, ios can choose file_picker this third-party plug-in

Android 10 或以上 需要在 AndroidManifest.xmlapplication 中添加 android:requestLegacyExternalStorage="true"

传入 path ,支持 自定义路径查询 例如 查询下载目录:"/storage/emulated/0/Download/"

Android 10 or above need to be added in the application of AndroidManifest.xml

Pass in path to support custom path query. For example, query download directory: "/storage/emulated/0/Download/"

/// Demo
import 'package:fget_file/fget_file_page.dart';
import 'package:fget_file/config_model.dart';

Navigator.push(context, MaterialPageRoute(builder: (context)=>
    FgetFilePage(
      configModel: ConfigModel(
        types: ["pdf","doc",],
        max: 5,
        path: null, //
      ),
      callback: (v){
        print(v);
      },
      // Customize  UI
      build: (FileModelEntity v,bool b){
        print("loading data: ${v.data}");
        print("loading status: $b"); // true = loading,false  = loading ok
        return Scaffold(
          appBar: AppBar(title: Text("Customize"),),
        );
      },
    ),
    ),
); 

Libraries

config_model
fget_file
fget_file_page
fget_file_web
file_model_entity
file_model_entity_helper
json_convert_content
json_field