filepond 0.0.2 copy "filepond: ^0.0.2" to clipboard
filepond: ^0.0.2 copied to clipboard

FilePond, Where files go to stretch their bits.

filepond #

A Dart package providing file management components for your Flutter applications.

inspired by https://github.com/pqina/filepond

Features #

  • Easy-to-use file picker and uploader components
  • Customizable UI for file selection and upload progress
  • Supports multiple file types

Installation #

Add the following to your pubspec.yaml:

flutter pub add filepond

Then run:

flutter pub get

Usage #

Import the package in your Dart code:

import 'package:filepond/filepond.dart';

Wrap your widget tree with the Filepond widget and provide a controller:

import 'package:filepond/filepond.dart';

class MyFileUploader extends StatelessWidget {
  final controller = FilepondController(baseUrl: 'http://localhost:3000/upload');

  @override
  Widget build(BuildContext context) {
    return Filepond(
      controller: controller,
      // FilepondWidget is used internally as the child
    );
  }
}

To access the controller anywhere in the widget subtree, use:

final controller = Filepond.controllerOf(context);

You can then call upload methods or listen to progress using the controller.

Example #

See the apps/example app for a complete usage example.

License #

MIT