file_picker_slider 0.0.1
file_picker_slider: ^0.0.1 copied to clipboard
A Flutter widget for picking multiple files and previewing them with a slider and filename display. Supports web and mobile.
file_picker_slider #
A Flutter widget for picking and previewing one or multiple files with a slider and file name display. Supports both Web and Mobile platforms.
Features #
- 📁 Single and multiple file picking
- 🌐 Web and 📱 Mobile support
- 🎠 Carousel slider for browsing selected files
- 🏷️ Displays the name of the current file while scrolling
Installation #
Add this to your pubspec.yaml:
dependencies:
file_picker_slider:
git:
url: https://github.com/usmanuot/file_picker_slider.git
Usage #
➕ Multiple File Picker #
FilePickerSlider(
allowMultiple: true,
fileName: model.productNameOrUrl,
size: R().getWidth(context, 10),
width: R().getWidth(context, 10),
height: R().getWidth(context, 10),
file: model.file,
imageBytes: model.imageBytes,
onFilePicked: (files, bytes, names) {
model.addFiles(files, bytes, names);
},
)
➖ Single File Picker #
FilePickerSlider(
allowMultiple: false,
fileName: model.fileName,
size: R().getWidth(context, 10),
width: R().getWidth(context, 10),
height: R().getWidth(context, 10),
file: model.file,
imageBytes: model.imageBytes,
onFilePicked: (files, bytes, names) {
model.addFiles(files, bytes, names);
},
)
License #
MIT