multi_media_picker 0.0.1 copy "multi_media_picker: ^0.0.1" to clipboard
multi_media_picker: ^0.0.1 copied to clipboard

discontinued
outdated

A fork of the official image_picker plugin that adds the functionality to pick multiple images/videos.

multi_media_picker #

A fork of the official image_picker plugin that adds the functionality to pick multiple images.

Please note that this is still under development and therefore only Android is supported as of now. iOS support is planned tho.

Installation #

First, add image_picker as a dependency in your pubspec.yaml file.

iOS #

Add the following keys to your Info.plist file, located in <project root>/ios/Runner/Info.plist:

  • NSPhotoLibraryUsageDescription - describe why your app needs permission for the photo library. This is called Privacy - Photo Library Usage Description in the visual editor.
  • NSCameraUsageDescription - describe why your app needs access to the camera. This is called Privacy - Camera Usage Description in the visual editor.
  • NSMicrophoneUsageDescription - describe why your app needs access to the microphone, if you intend to record videos. This is called Privacy - Microphone Usage Description in the visual editor.

Android #

No configuration required - the plugin should work out of the box.

Example #

import 'package:multi_media_picker/multi_media_picker.dart';

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  List<File> _images;

  Future getImage() async {
    var images = await MultiMediaPicker.pickImage(sources: ImageSource.camera);

    setState(() {
      _images = images;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Image Picker Example'),
      ),
      body: Center(
        child: _images == null
            ? Text('No image selected.')
            : Image.file(_images[0]),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: getImage,
        tooltip: 'Pick Image',
        child: Icon(Icons.add_a_photo),
      ),
    );
  }
}
13
likes
0
pub points
22%
popularity

Publisher

unverified uploader

A fork of the official image_picker plugin that adds the functionality to pick multiple images&#x2F;videos.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, video_player

More

Packages that depend on multi_media_picker