drishya_picker 1.0.0+1
drishya_picker: ^1.0.0+1 copied to clipboard

Messenger like image, video picker with two different option. 1. Using Controller 2. Using MediaPicker widget

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

import 'picker_1.dart';
import 'picker_2.dart';

void main() {
  runApp(MyApp());
}

///
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: _Home(),
    );
  }
}

class _Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Media Picker'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            TextButton(
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => Picker1()),
                );
              },
              child: const Text('Pick using controller'),
              style: TextButton.styleFrom(
                primary: Colors.white,
                backgroundColor: Colors.green,
              ),
            ),
            const SizedBox(height: 20.0),
            TextButton(
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => Picker2()),
                );
              },
              child: const Text('Pick without controller'),
              style: TextButton.styleFrom(
                primary: Colors.white,
                backgroundColor: Colors.green,
              ),
            ),
          ],
        ),
      ),
    );
  }
}
4
likes
120
pub points
34%
popularity

Messenger like image, video picker with two different option. 1. Using Controller 2. Using MediaPicker widget

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

koiralapankaj007@gmail.com

License

Apache 2.0 (LICENSE)

Dependencies

bloc, flutter, flutter_bloc, photo_manager

More

Packages that depend on drishya_picker