drishya_picker

Messanger like media picker

. . . . .


/// Media picker demo using controller
class PickerDemo extends StatelessWidget {
  late final GalleryController controller;

  @override
  void initState() {
    super.initState();
    controller = GalleryController(
      gallerySetting: const GallerySetting(
        albumSubtitle: 'Collapsable',
        enableCamera: true,
        maximum: 10,
        requestType: RequestType.all,
      ),
      panelSetting: const PanelSetting(topMargin: 24.0),
    );
  }

  @override
  void dispose() {
    controller.dispose();
    super.dispose();
  }


  @override
  Widget build(BuildContext context) {
    return GalleryViewWrapper(
      controller: controller,
      child: Scaffold(
        body: TextButton(
           onPressed: () async {
             final entities = await controller.pick(context);
           },
           style: TextButton.styleFrom(
             primary: Colors.white,
             backgroundColor: Colors.green,
           ),
           child: const Text('Pick'),
         ),
      ),
    );
  }
}
  • Remove GalleryViewWrapper for fullscreen navigation

/// Media picker demo using controller
class PickerDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: TextButton(
           onPressed: () async {
             final entities = await controller.pick(context);
           },
           style: TextButton.styleFrom(
             primary: Colors.white,
             backgroundColor: Colors.green,
           ),
           child: const Text('Pick'),
       ),
    );
  }
}

Libraries

custom_icons
Flutter icons CustomIcons Copyright (C) 2021 by original authors @ fluttericon.com, fontello.com This font was generated by FlutterIcon.com, which is derived from Fontello. [...]
drishya_picker