Compare commits

..

No commits in common. "a1ce17d675bc3970879c4f308d64efe728005538" and "f965b99e1d13af339e6b7a00a49f0364416d3055" have entirely different histories.

3 changed files with 3 additions and 9 deletions

View file

@ -36,6 +36,7 @@ class LightmeterAnalyticsFirebase implements ILightmeterAnalyticsApi {
stackTrace,
reason: reason,
information: information,
fatal: true,
);
}

View file

@ -10,14 +10,7 @@ Future<double> evFromImage(Uint8List bytes) async {
final apertureValueRatio = (tags["EXIF FNumber"]?.values as IfdRatios?)?.ratios.first;
final speedValueRatio = (tags["EXIF ExposureTime"]?.values as IfdRatios?)?.ratios.first;
if (iso == null || apertureValueRatio == null || speedValueRatio == null) {
throw ArgumentError(
'Error parsing EXIF: ${tags.keys.join(', ')}',
[
if (iso == null) 'EXIF ISOSpeedRatings',
if (apertureValueRatio == null) 'EXIF FNumber',
if (speedValueRatio == null) 'EXIF ExposureTime',
].join(', '),
);
throw FlutterError('Error parsing EXIF: ${tags.keys}');
}
final aperture = apertureValueRatio.numerator / apertureValueRatio.denominator;

View file

@ -17,7 +17,7 @@ void main() {
'no EXIF',
() {
final bytes = File('assets/launcher_icon_dev_512.png').readAsBytesSync();
expectLater(evFromImage(bytes), throwsArgumentError);
expectLater(evFromImage(bytes), throwsFlutterError);
},
);
});