A flutter package for to use a camera with list of files

whatsapp_camera

This is a package to open a camera along with a photo gallery, to simplify the steps of the end user

It also has a widget for viewing images

how to use

Open camera:

List<File>? res = await Navigator.push(
  context, MaterialPageRoute(
    builder: (context) => const WhatsappCamera(),
  ),
);

Open image:

Navigator.push(
  context, MaterialPageRoute(
    builder: (context) => const ViewImage(
      image: 'https://...', 
      imageType: ImageType.network,
    ),
  ),
);


Android

add permissions: file: /android/app/main/AndroidManifest.xml

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
  android:requestLegacyExternalStorage="true"
  ...

file: android/app/build.gradle

minSdkVersion 21
compileSdkVersion 33

ios

file: /ios/Runner/Info.plist

<key>NSCameraUsageDescription</key>
<string>Can I use the camera please?</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Used to demonstrate image picker plugin</string>

LICENSE

Feito com ❤️ by Weliton Sousa

GitHub

View Github