Last updated:
0 purchases
flutter exif
flutter_exif #
A Flutter plugin for accessing to all metadata from your photos. Supports iOS and Android.
Getting Started #
In Android, you need to add the READ_EXTERNAL_STORAGE permission in your AndroidManifest.xml.
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
copied to clipboard
In iOS, you need to add the key NSPhotoLibraryUsageDescription in your Info.plist file.
<key>NSPhotoLibraryUsageDescription</key>
<string>We need access to your photos in your gallery for this demo</string>
copied to clipboard
Usage #
Import package #
To use this plugin you must add flutter_exif as a dependency in your pubspec.yaml file.
dependencies:
flutter_exif: ^1.0.0
copied to clipboard
Example #
import 'package:flutter_exif/flutter_exif.dart';
copied to clipboard
Listing images from your gallery filtered by an initial date and an end date. NOTE: By now, only the images with GPS data in their metadata is returned.
// milliseconds
int startingAt = 1574679600000;
int endingAt = 1575370800000;
List<FlutterExifData> list = await FlutterExif.list( startingAt, endingAt );
copied to clipboard
Retrieve the image data for a FlutterExifData object:
FlutterExifData item = ...;
Uint8List data = await FlutterExif.image( item.identifier );
copied to clipboard
Models #
FlutterExifData
class FlutterExifData {
String identifier;
int width;
int height;
int createdAt;
double latitude;
double longitude;
double altitude; // Only in iOS
}
copied to clipboard
Credits #
This plugin has been created and developed by Daniel MartÃnez.
Any suggestions and contributions are welcomed.
Thanks for using this plugin!
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.