file_picker_slider 0.0.3
file_picker_slider: ^0.0.3 copied to clipboard
A Flutter widget that allows image selection and preview with support for file picking, uploading, and multiple file previews.
example/lib/main.dart
import 'package:file_picker_slider/file_picker_slider.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'File Picker Slider',
home: Scaffold(
appBar: AppBar(title: const Text("File Picker Slider")),
body: Center(
child: FilePickerWidget(
allowMultiple: true,
imageUrl: "", //add initial url/file path here
height: 300,
width: 300,
radius: 50,
size: 300,
// placeholderWidget: Container(), // your placeholder widget
imageBytes:
null, //add for web only like this Uint8List? imageBytes;
file: null, //add for mobile only
uploader:
false, // use your loader bool variable for uploading purpose
uploadingWidget:
null, // add you loader widget during uploading file to show on custom widget
onFilePicked: (files, bytes, names) {
// user the files, bytes and names list for your own use here
},
),
),
),
);
}
}