flutter_ios_folder_picker 0.0.1 copy "flutter_ios_folder_picker: ^0.0.1" to clipboard
flutter_ios_folder_picker: ^0.0.1 copied to clipboard

PlatformiOS

A Flutter plugin to allow users to pick a folder on iOS. This plugin integrates with native iOS functionality to open the folder picker, enabling users to select a folder path within their file system [...]

flutter_ios_folder_picker #

A Flutter plugin to pick a folder on iOS.

Note: This plugin currently only supports iOS.

🚀 Features #

  • Open native iOS folder picker
  • Return the selected folder path
  • Singleton instance for easy access

📦 Installation #

Add this to your pubspec.yaml:

dependencies:
  flutter_ios_folder_picker:
    git:
      url: https://github.com/your-repo/flutter_ios_folder_picker.git

🔧 iOS Setup #

In your ios/Runner/Info.plist, add the following:

<key>UIFileSharingEnabled</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
<key>NSDocumentPickerUsageDescription</key>
<string>This app needs folder access to read files.</string>

🛠️ Usage #

Import the package:

import 'package:flutter_ios_folder_picker/flutter_ios_folder_picker.dart';

Pick a folder:

final folderPicker = FlutterIosFolderPicker();
String? folderPath = await folderPicker.pickFolder();

if (folderPath != null) {
  print('Selected folder: $folderPath');
} else {
  print('No folder selected.');
}

📋 Example #

ElevatedButton(
  onPressed: () async {
    final folderPath = await FlutterIosFolderPicker().pickFolder();
    if (folderPath != null) {
      print('Folder picked: $folderPath');
    }
  },
  child: Text('Pick Folder'),
)

⚠️ Limitations #

  • Only works on iOS 14+.
  • Not available for Android.

📄 License #

MIT License.


Made with ❤️ by mxgk

2
likes
140
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin to allow users to pick a folder on iOS. This plugin integrates with native iOS functionality to open the folder picker, enabling users to select a folder path within their file system. It is a simple and effective solution for apps that need folder access for file management on iOS devices.

Documentation

API reference

License

BSL-1.0 (license)

Dependencies

flutter

More

Packages that depend on flutter_ios_folder_picker