搜尋套件、儲存庫與 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 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。