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

A Flutter plugin for picking folder in Desktop (Window and MacOS).

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_desktop_folder_picker/flutter_desktop_folder_picker.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String? _path = 'Unknown';

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Example'),
        ),
        body: Center(
          child: Text('Get folder path: $_path\n'),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: () async {
            String? path =
                await FlutterDesktopFolderPicker.openFolderPickerDialog();
            setState(() {
              _path = path;
            });
          },
          child: const Icon(Icons.add),
        ),
      ),
    );
  }
}
9
likes
150
points
107
downloads

Publisher

verified publisherlynical.com

Weekly Downloads

A Flutter plugin for picking folder in Desktop (Window and MacOS).

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

filepicker_windows, flutter

More

Packages that depend on flutter_desktop_folder_picker