flutter_unified_image_picker 1.0.1 copy "flutter_unified_image_picker: ^1.0.1" to clipboard
flutter_unified_image_picker: ^1.0.1 copied to clipboard

A powerful Flutter plugin for **camera capture** and **gallery selection** with a draggable bottom sheet. Fully decoupled architecture using **CameraService**, **GalleryService**, and **BottomSheetSer [...]

example/lib/main.dart

import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_unified_image_picker/flutter_unified_image_picker.dart';

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

class DemoApp extends StatelessWidget {
  const DemoApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Image Picker Pro',
      home: HomeView(),
    );
  }
}

class HomeView extends StatefulWidget {
  const HomeView({super.key});

  @override
  State<HomeView> createState() => _HomeViewState();
}

class _HomeViewState extends State<HomeView> {
  String? imagePath;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        automaticallyImplyLeading: false,
        title: Text('Image Preview'),
        centerTitle: true,
        backgroundColor: Colors.blue,
        foregroundColor: Colors.white,
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () async {
          final result = await Navigator.push(
            context,
            MaterialPageRoute(builder: (_) => CameraView()),
          );

          if (result != null) {
            setState(() {
              imagePath = result;
            });
          }
        },
        child: Icon(Icons.camera),
      ),
      body: Center(
        child:
            imagePath != null
                ? Image.file(File(imagePath!), fit: BoxFit.contain)
                : Column(
                  crossAxisAlignment: CrossAxisAlignment.center,
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    Icon(Icons.error),
                    const SizedBox(height: 8),
                    Text('No Image Found'),
                  ],
                ),
      ),
    );
  }
}
7
likes
150
points
175
downloads

Publisher

unverified uploader

Weekly Downloads

A powerful Flutter plugin for **camera capture** and **gallery selection** with a draggable bottom sheet. Fully decoupled architecture using **CameraService**, **GalleryService**, and **BottomSheetService**, all managed by `ImagePickerController`.

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

camera, flutter, permission_handler, plugin_platform_interface

More

Packages that depend on flutter_unified_image_picker

Packages that implement flutter_unified_image_picker