diff --git a/integration_test/mocks/paid_features_mock.dart b/integration_test/mocks/paid_features_mock.dart index fd71c77..f7a4bdb 100644 --- a/integration_test/mocks/paid_features_mock.dart +++ b/integration_test/mocks/paid_features_mock.dart @@ -75,9 +75,7 @@ class _MockIAPProvidersState extends State { id: any(named: 'id'), note: any(named: 'note'), apertureValue: any(named: 'apertureValue'), - removeApertureValue: any(named: 'removeApertureValue'), shutterSpeedValue: any(named: 'shutterSpeedValue'), - removeShutterSpeedValue: any(named: 'removeShutterSpeedValue'), ), ).thenAnswer((_) async {}); when(() => mockIapStorageService.deletePhoto(any())).thenAnswer((_) async {}); diff --git a/lib/providers/logbook_photos_provider.dart b/lib/providers/logbook_photos_provider.dart index 0761d19..ac064b7 100644 --- a/lib/providers/logbook_photos_provider.dart +++ b/lib/providers/logbook_photos_provider.dart @@ -100,10 +100,9 @@ class LogbookPhotosProviderState extends State { await widget.storageService.updatePhoto( id: photo.id, note: oldProfile.note != photo.note ? photo.note : null, - apertureValue: oldProfile.apertureValue != photo.apertureValue ? photo.apertureValue : null, - removeApertureValue: photo.apertureValue == null, - shutterSpeedValue: oldProfile.shutterSpeedValue != photo.shutterSpeedValue ? photo.shutterSpeedValue : null, - removeShutterSpeedValue: photo.shutterSpeedValue == null, + apertureValue: oldProfile.apertureValue != photo.apertureValue ? Optional(photo.apertureValue) : null, + shutterSpeedValue: + oldProfile.shutterSpeedValue != photo.shutterSpeedValue ? Optional(photo.shutterSpeedValue) : null, ); _photos[photo.id] = photo; setState(() {}); diff --git a/pubspec.lock b/pubspec.lock index dde899f..7e56007 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -884,17 +884,21 @@ packages: m3_lightmeter_iap: dependency: "direct main" description: - path: "/Users/vodemn/Documents/GitHub/Vodemn/m3_lightmeter_iap" - relative: false - source: path + path: "." + ref: HEAD + resolved-ref: "32e053b7d14009c6d61daf56f1556de3365297cb" + url: "https://github.com/vodemn/m3_lightmeter_iap" + source: git version: "2.2.0+31" m3_lightmeter_resources: dependency: "direct main" description: - path: "/Users/vodemn/Documents/GitHub/Vodemn/m3_lightmeter_resources" - relative: false - source: path - version: "2.2.0+10" + path: "." + ref: "v2.3.0" + resolved-ref: a8c419f21fcda06d76d26cc2416de459f0d51a60 + url: "https://github.com/vodemn/m3_lightmeter_resources" + source: git + version: "2.3.0+11" macros: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 3fa98fb..e57257a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -33,11 +33,12 @@ dependencies: m3_lightmeter_iap: git: url: "https://github.com/vodemn/m3_lightmeter_iap" - ref: v2.2.0 + branch: main m3_lightmeter_resources: git: url: "https://github.com/vodemn/m3_lightmeter_resources" - ref: v2.2.0 + ref: v2.3.0 + map_launcher: 3.2.0 material_color_utilities: 0.12.0 package_info_plus: 8.1.3 permission_handler: 11.3.1 @@ -47,7 +48,6 @@ dependencies: url_launcher_ios: 6.3.2 uuid: 4.5.1 vibration: 2.0.1 - map_launcher: 3.2.0 dev_dependencies: args: 2.6.0 @@ -68,10 +68,6 @@ dev_dependencies: dependency_overrides: geolocator_android: 4.6.1 - m3_lightmeter_iap: - path: /Users/vodemn/Documents/GitHub/Vodemn/m3_lightmeter_iap - m3_lightmeter_resources: - path: /Users/vodemn/Documents/GitHub/Vodemn/m3_lightmeter_resources material_color_utilities: 0.11.1 flutter: diff --git a/test/providers/logbook_photos_provider_test.dart b/test/providers/logbook_photos_provider_test.dart index 579effc..c9fd6ab 100644 --- a/test/providers/logbook_photos_provider_test.dart +++ b/test/providers/logbook_photos_provider_test.dart @@ -29,10 +29,8 @@ void main() { () => storageService.updatePhoto( id: any(named: 'id'), note: any(named: 'note'), - apertureValue: any(named: 'apertureValue'), - removeApertureValue: any(named: 'removeApertureValue'), - shutterSpeedValue: any(named: 'shutterSpeedValue'), - removeShutterSpeedValue: any(named: 'removeShutterSpeedValue'), + apertureValue: any?>(named: 'apertureValue'), + shutterSpeedValue: any?>(named: 'shutterSpeedValue'), ), ).thenAnswer((_) async {}); when(() => storageService.deletePhoto(any())).thenAnswer((_) async {}); @@ -155,8 +153,8 @@ void main() { () => storageService.updatePhoto( id: updatedPhoto.id, note: 'Updated note', - removeApertureValue: true, - removeShutterSpeedValue: true, + apertureValue: const Optional(null), + shutterSpeedValue: const Optional(null), ), ).called(1);