image_upload 1.0.0
image_upload: ^1.0.0 copied to clipboard
A customizable Flutter widget for seamless image capture, gallery selection, interactive preview, and efficient uploading, enhancing user experience in mobile apps.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:image_upload/image_upload.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(title: const Text('Image Upload Example')),
body: Center(
child: ImageUploadWidget(
allowMultiple: true,
onImagesSelected: (images) {
print("Selected images: ${images.map((e) => e.path)}");
},
onUploadTap: (paths) {
print("Ready to upload: $paths");
},
),
),
),
);
}
}