패키지, 저장소 및 앱 카테고리 검색

패키지 상세v2.1.0

open_file_manager

기본 파일 관리자 앱을 열기 위한 플러터 플러그인입니다. Android에서는 파일 관리자 앱에서 다운로드/최근 폴더를 엽니다. iOS에서는 Files 앱에서 앱의 문서 폴더를 엽니다.

AndroidiOS
30일 다운로드
1.5만
좋아요
39
Pub 점수
160

패키지 설치

flutter pub add open_file_manager

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

기기의 기본 파일 관리자 앱을 여는 Flutter 플러그인입니다. 안드로이드에서는 다운로드 또는 최근 폴더로 이동하고, 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

소스 저장소

이 패키지를 사용하는 프로젝트