Compare commits

..

8 commits

Author SHA1 Message Date
Vadim
6f3612cd55 fixed tests 2024-02-13 19:20:53 +01:00
Vadim
fb05fb101c Merge branch 'main' of https://github.com/vodemn/m3_lightmeter into feature/ML-154 2024-02-13 19:10:11 +01:00
Vadim
6ba89d817d improved EXIF errors reporting 2024-02-13 19:08:28 +01:00
Vadim
4f4b6cf1eb
ML-154 Made errors non-fatal by default (#158)
* removed unused analytics event & added `logCrash`

* added analytics to `RemoteConfigService`

* run app with `runZonedGuarded`

* added crash logging to `CameraContainerBloc`

* log product id for IAP errors

* typo

* log crashes in `RemoteConfigService`

* ignore silent `FlutterError`

* fixed `evFromImage` test

* fixed `showBuyProDialog` test

* log errors in console

* depend on iap 0.7.2

* Made errors non-fatal by default
2024-02-13 18:19:43 +01:00
Vadim
fac0d2a2c6 Made errors non-fatal by default 2024-02-13 18:18:18 +01:00
Vadim
bd69487a52 Merge branch 'main' of https://github.com/vodemn/m3_lightmeter into feature/ML-154 2024-02-13 18:04:27 +01:00
github-actions[bot]
f965b99e1d Version bump 2024-01-27 22:34:29 +00:00
Vadim
fc37016770
ML-154 Improve Crashlytics reports (#155)
* removed unused analytics event & added `logCrash`

* added analytics to `RemoteConfigService`

* run app with `runZonedGuarded`

* added crash logging to `CameraContainerBloc`

* log product id for IAP errors

* typo

* log crashes in `RemoteConfigService`

* ignore silent `FlutterError`

* fixed `evFromImage` test

* fixed `showBuyProDialog` test

* log errors in console

* depend on iap 0.7.2
2024-01-27 23:20:53 +01:00
4 changed files with 10 additions and 4 deletions

View file

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

View file

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

View file

@ -1,7 +1,7 @@
name: lightmeter name: lightmeter
description: Lightmeter app inspired by Material 3 design system. description: Lightmeter app inspired by Material 3 design system.
publish_to: "none" publish_to: "none"
version: 0.17.1+47 version: 0.17.2+48
environment: environment:
sdk: ">=3.0.0 <4.0.0" sdk: ">=3.0.0 <4.0.0"

View file

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