搜索插件、代码仓与 APP 分类

full_picker 封面
插件详情v2.1.5

full_picker

一个帮助您以不同模式选择文件的 Flutter 包。

AndroidiOS
近 30 天下载
142
喜欢数
36
Pub 分数
130

安装插件

flutter pub add full_picker

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Full Picker 是一个 Flutter 包,旨在简化在各种模式下的文件选择,使用户能够在 Android 和 iOS 上从不同来源选择文件。它提供了一个直观的界面,用于选择单个或多个文件,支持多种文件类型,并提供可自定义的选项。该包设计时注重易于集成,通过简化 Flutter 应用中的文件处理流程来提升用户体验。该包由 mbfakouri.ir 维护,并可通过 pub.dev 获取。

适合场景

  • 选择图像和文档
  • 一次选择多个文件
  • 将文件选择集成到表单中
  • 支持文件上传
  • 启用媒体选择功能

主要特点

  • 跨平台支持(Android 和 iOS)
  • 多文件选择
  • 可自定义的文件类型过滤
  • 简单的 API 集成
  • 内置文件预览

适合对象

  • 媒体密集型应用
  • 文档管理系统
  • 用户资料上传功能
  • 基于表单的数据收集
  • 文件共享应用

使用建议

  • 需要平台特定权限
  • 限于 Android 和 iOS
  • 可能需要针对文件类型进行额外验证
  • 依赖设备存储访问
  • 不适用于Web平台

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

logo

Full picker

pub package
A Flutter package that helps you select files in different modes

Features

  • Multi File picker
  • Video Compressor
  • Image Cropper
  • Custom Camera
  • Custom Name For Files
  • Voice recorder
  • URL picker
  • Support Material 1,2,3

Example App

Usage

Quick simple usage example:

FullPicker(
  context: context,
  prefixName: "test",
  file: true,
  image: true,
  video: true,
  videoCamera: true,
  imageCamera: true,
  voiceRecorder: true,
  videoCompressor: false,
  imageCropper: false,
  multiFile: true,
  url: true,
  onError: (int value) {
    print(" ----  onError ----=$value");
  },
  onSelected: (value) {
    print(" ----  onSelected ----");
  },
);

and use minSdkVersion 21 in your Module-level build.gradle file

Video Compressor

If you need to compress the video (only support Android And IOS), add the following

iOS

Add the following to your Info.plist file, located in <project root>/ios/Runner/Info.plist:

<key>NSPhotoLibraryUsageDescription</key>
<string>${PRODUCT_NAME} library Usage</string>
Android

Add the following permissions in AndroidManifest.xml:

API < 29

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28"/>

API >= 29

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

Include this in your Project-level build.gradle file:

allprojects {
    repositories {
        .
        .
        .
        maven { url 'https://jitpack.io' }
    }
}

Include this in your Module-level build.gradle file:

implementation 'com.github.AbedElazizShe:LightCompressor:1.0.0

Image Cropper

If you need to crop the image (only support Android And IOS), add the following

Android
  • Add UCropActivity into your AndroidManifest.xml
<activity
    android:name="com.yalantis.ucrop.UCropActivity"
    android:screenOrientation="portrait"
    android:theme="@style/Ucrop.CropTheme"/>
iOS
  • No configuration required

Voice Recorder

If you need to voice recorder, add the following

Android
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<!-- Optional, you'll have to check this permission by yourself. -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

min SDK: 19 (maybe higher => encoder dependent)

iOS
<key>NSMicrophoneUsageDescription</key>
<string>We need to access to the microphone to record audio file</string>

min SDK: 11.0

macOS
<key>NSMicrophoneUsageDescription</key>
<string>We need to access to the microphone to record audio file</string>

Multi Language

There is a possibility of customization for different languages in this package

FullPickerLanguage language = FullPickerLanguage.copy(
    camera: S.current.camera,
    selectFile: S.current.selectFile,
    file: S.current.file,
    voiceRecorder: S.current.voiceRecorder,
    url: S.current.url,
    enterURL: S.current.enterURL,
    cancel: S.current.cancel,
    ok: S.current.ok,
    gallery: S.current.gallery,
    cropper: S.current.cropper,
    onCompressing: S.current.onCompressing,
    tapForPhotoHoldForVideo: S.current.tapForPhotoHoldForVideo,
    cameraNotFound: S.current.cameraNotFound,
    noVoiceRecorded: S.current.noVoiceRecorded,
    denyAccessPermission: S.current.denyAccessPermission);
    
FullPicker(
  ...
  language: language,
  ...
);   

S For intl Package

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

所属分类

依赖

依赖清单 14 项

源码仓库

使用此插件的项目

暂无相关数据。