open_file_manager
기본 파일 관리자 앱을 열기 위한 플러터 플러그인입니다. Android에서는 파일 관리자 앱에서 다운로드/최근 폴더를 엽니다. iOS에서는 Files 앱에서 앱의 문서 폴더를 엽니다.
기본 파일 관리자 앱을 여는 Flutter 플러그인입니다. 안드로이드에서는 파일 관리자 앱의 다운로드/최근 폴더를 엽니다. iOS에서는 Files 앱에서 앱의 문서 폴더를 엽니다.
{"sdk":"flutter"}^2.1.8^6.0.0{"sdk":"flutter"}아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A Flutter plugin to open the default File Manager 📁 app.
| Android | iOS |
|---|---|
| SDK 21+ | iOS 12+ |
Use of
AndroidFolderType.otherrequires minimumSDK 26in Android.
Android:
Recent, Downloads, and Other folders.Other folder, you need to specify the folder path.iOS:
Please follow the iOS platform configuration ⬇️ before jump to the Dart code.
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.
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',
),
);
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.
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/ScreenshotsIf folderPath does not exist, the Recent folder will be opened.