Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use this? #2

Open
icangku opened this issue Jan 25, 2021 · 1 comment
Open

how to use this? #2

icangku opened this issue Jan 25, 2021 · 1 comment

Comments

@icangku
Copy link

icangku commented Jan 25, 2021

I see this package as the ultimate solution, that I've been looking for, but I can't see the documentation of using.

@gatanaso
Copy link

Hi @icangku,

You can find the usage examples here: https://github.com/Beakyn/exif_flutter/blob/master/example/lib/main.dart. Here is a small excerpt from that code:

    final attributesFirst = await Exif.getAttributes(filePath);
    print(attributesFirst);

    final latitude = -4.8055555;
    final longitude = -39.3555555;
    final dateTimeOriginal = DateTime.parse('2009-08-11 16:45:32');
    final userComment = 'You can add a metadata stringified version here';

    final newAttributes = Metadata(
      latitude: latitude,
      longitude: longitude,
      dateTimeOriginal: dateTimeOriginal,
      userComment: userComment,
    );

    await Exif.setAttributes(filePath, newAttributes);
    final attributesSecond = await Exif.getAttributes(filePath);
    print(attributesSecond);

If your question was regarding how to add the package to the pubspec.yaml then you can directly include the GitHub dependency (until it is published to pub.dev). For example:

dependencies:
  exif_flutter:
    git:
      url: git://github.com/Beakyn/exif_flutter

Here are the docs for using unpublished packages: https://flutter.dev/docs/development/packages-and-plugins/using-packages#dependencies-on-unpublished-packages

Hope this helps,
G

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants