flutter_exif 1.0.1

flutter_exif #

pub package

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" />

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>

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

Example #

import 'package:flutter_exif/flutter_exif.dart';

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 );

Retrieve the image data for a FlutterExifData object:

FlutterExifData item = ...;
Uint8List data = await FlutterExif.image( item.identifier );

Models #

FlutterExifData #

class FlutterExifData {
    String identifier;
    int width;
    int height;
    int createdAt;
    double latitude;
    double longitude;
    double altitude;                        // Only in iOS
}

Credits #

This plugin has been created and developed by Daniel Martínez.

Any suggestions and contributions are welcomed. Thanks for using this plugin!

1.0.1 #

  • Timestamps in parameters and results are now in milliseconds.
  • If no 'width' and 'height' parameters are provided in the 'images' method, the full size is returned for images.

1.0.0 #

  • Published plugin.

example/README.md

flutter_exif_example #

Demonstrates how to use the flutter_exif plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_exif: ^1.0.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_exif/flutter_exif.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
25
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
62
Learn more about scoring.

We analyzed this package on Feb 12, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health issues and suggestions

Document public APIs. (-1 points)

22 out of 22 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/flutter_exif.dart.

Run flutter format to format lib/flutter_exif.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test