I'm trying to return the exif from the file that I can print directly from within the function, but whenever I use return it sends a Future. Looks like await doesn't work.
import 'dart:io';
import 'package:exif/exif.dart';
consultaDataArquivo(var pathArquivo) async {
final dadosDoArquivo = await pathArquivo.readAsBytesSync();
var dadosExif = await readExifFromBytes(dadosDoArquivo);
return dadosExif;
}
main() {
print(consultaDataArquivo(File('/home/rcaliman/Downloads/_DSC8982.JPG')));
}