パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v2.1.0

open_file_manager

デフォルトのファイルマネージャーアプリを開くためのFlutterプラグインです。Androidでは、ファイルマネージャーアプリでダウンロード/最近のフォルダを開きます。iOSでは、Filesアプリでアプリのドキュメントフォルダを開きます。

AndroidiOS
30日間ダウンロード
1.5万
いいね数
39
Pub ポイント
160

パッケージをインストール

flutter pub add open_file_manager

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

デバイスのデフォルトのファイルマネージャーアプリを開くためのFlutterプラグインです。Androidでは、ダウンロードまたは最近のフォルダに移動します。iOSでは、Filesアプリ内のアプリのドキュメントディレクトリが開きます。これにより、カスタムのファイルブラウジングインターフェースを必要とせずに、アプリコンテキスト内で簡単にファイルにアクセスして管理できます。このプラグインはネイティブなシステム動作を利用することで、ファイルナビゲーションを簡素化し、プラットフォーム間で一貫したユーザー体験を確保しています。

用途

  • ファイルアプリでアプリ固有のドキュメントを開く
  • 最近またはダウンロードしたファイルに移動する
  • アプリ内からユーザーのファイル管理を有効にする
  • ファイル保存ワークフローとの統合
  • アプリストレージディレクトリへの迅速なアクセスを提供

主な機能

  • クロスプラットフォーム互換性(Android および iOS)
  • 最小限の設定でデフォルトのファイルマネージャーを開く
  • ダウンロード/最近またはアプリドキュメントへの直接ナビゲーション
  • ネイティブなシステムファイルエクスプローラーを使用
  • pub add コマンドによる簡単な統合

適している対象

  • ファイルアクセス機能を必要とするアプリ
  • ファイル共有または文書管理アプリ
  • ローカルファイルを生成または保存するアプリ
  • ネイティブファイルブラウザ統合を求める開発者
  • 最小限のファイルUIの複雑さを必要とするプロジェクト

注意事項

  • 特定のフォルダ選択に対する制御が限られている
  • デバイスのデフォルトのファイルマネージャーに依存しています
  • カスタムファイルブラウジングUIのサポートなし
  • デバイスによって動作がわずかに異なる場合があります
  • ファイルの作成や編集を直接処理しない

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Open File Manager

A Flutter plugin to open the default File Manager 📁 app.

Platform Support

Android iOS
SDK 21+ iOS 12+

Use of AndroidFolderType.other requires minimum SDK 26 in Android.

Features 🚀

  • Android:

    • Ability to open Recent, Downloads, and Other folders.
    • For the Other folder, you need to specify the folder path.
  • iOS:

    • Ability to open the app’s Documents folder and its subdirectories.

Please follow the iOS platform configuration ⬇️ before jump to the Dart code.

iOS Configuration

The iOS app can open the app’s Documents folder and its subdirectories if specified.

The plugin will open the Files app on iOS. To display your app’s Documents folder under On My iPhone, add the following code snippet to your Info.plist:

<key>UISupportsDocumentBrowser</key>  
<true/>

Additionally, you must save at least one file to your app’s Documents folder for it to appear in the Files app.

Code Implementation 👨‍💻

It's a super simple to implement. Just call the openFileManager method and add androidConfig for Android and iosConfig for iOS.

import 'package:open_file_manager/open_file_manager.dart';

openFileManager(
   androidConfig: AndroidConfig(
       folderType: AndroidFolderType.recent,
   ),
   iosConfig: IosConfig(
       // Path is case-sensitive here.
       folderPath: 'Reports/Sheets',
   ),
);
Default method without config:
import 'package:open_file_manager/open_file_manager.dart';

openFileManager();

If androidConfig is not provided, the Android app will open the Downloads folder by default.

If iosConfig is not provided, the iOS app will open the app's Documents folder by default.

Open Other folder on Android:

To open a specific folder on Android, you need to set folderType as AndroidFolderType.other and provide the folderPath in AndroidConfig:

import 'package:open_file_manager/open_file_manager.dart';

openFileManager(
    androidConfig: AndroidConfig(
        folderType: AndroidFolderType.other,
        folderPath: 'Pictures/Screenshots',
    ),
);

The folderPath supports the following path formats:

  • Pictures/Screenshots
  • /storage/emulated/0/Pictures/Screenshots
  • /storage/243F-4E12/Pictures/Screenshots

If folderPath does not exist, the Recent folder will be opened.

カテゴリー

依存関係

依存関係一覧 1 件

  • plugin_platform_interface^2.1.8

ソースリポジトリ

このパッケージを使用しているプロジェクト