mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-08-05 04:36:41 +00:00
sync
This commit is contained in:
parent
74b1aed284
commit
7c8482714d
5 changed files with 21 additions and 26 deletions
|
@ -75,9 +75,7 @@ class _MockIAPProvidersState extends State<MockIAPProviders> {
|
||||||
id: any(named: 'id'),
|
id: any(named: 'id'),
|
||||||
note: any(named: 'note'),
|
note: any(named: 'note'),
|
||||||
apertureValue: any(named: 'apertureValue'),
|
apertureValue: any(named: 'apertureValue'),
|
||||||
removeApertureValue: any(named: 'removeApertureValue'),
|
|
||||||
shutterSpeedValue: any(named: 'shutterSpeedValue'),
|
shutterSpeedValue: any(named: 'shutterSpeedValue'),
|
||||||
removeShutterSpeedValue: any(named: 'removeShutterSpeedValue'),
|
|
||||||
),
|
),
|
||||||
).thenAnswer((_) async {});
|
).thenAnswer((_) async {});
|
||||||
when(() => mockIapStorageService.deletePhoto(any())).thenAnswer((_) async {});
|
when(() => mockIapStorageService.deletePhoto(any())).thenAnswer((_) async {});
|
||||||
|
|
|
@ -100,10 +100,9 @@ class LogbookPhotosProviderState extends State<LogbookPhotosProvider> {
|
||||||
await widget.storageService.updatePhoto(
|
await widget.storageService.updatePhoto(
|
||||||
id: photo.id,
|
id: photo.id,
|
||||||
note: oldProfile.note != photo.note ? photo.note : null,
|
note: oldProfile.note != photo.note ? photo.note : null,
|
||||||
apertureValue: oldProfile.apertureValue != photo.apertureValue ? photo.apertureValue : null,
|
apertureValue: oldProfile.apertureValue != photo.apertureValue ? Optional(photo.apertureValue) : null,
|
||||||
removeApertureValue: photo.apertureValue == null,
|
shutterSpeedValue:
|
||||||
shutterSpeedValue: oldProfile.shutterSpeedValue != photo.shutterSpeedValue ? photo.shutterSpeedValue : null,
|
oldProfile.shutterSpeedValue != photo.shutterSpeedValue ? Optional(photo.shutterSpeedValue) : null,
|
||||||
removeShutterSpeedValue: photo.shutterSpeedValue == null,
|
|
||||||
);
|
);
|
||||||
_photos[photo.id] = photo;
|
_photos[photo.id] = photo;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
|
18
pubspec.lock
18
pubspec.lock
|
@ -884,17 +884,21 @@ packages:
|
||||||
m3_lightmeter_iap:
|
m3_lightmeter_iap:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "/Users/vodemn/Documents/GitHub/Vodemn/m3_lightmeter_iap"
|
path: "."
|
||||||
relative: false
|
ref: HEAD
|
||||||
source: path
|
resolved-ref: "32e053b7d14009c6d61daf56f1556de3365297cb"
|
||||||
|
url: "https://github.com/vodemn/m3_lightmeter_iap"
|
||||||
|
source: git
|
||||||
version: "2.2.0+31"
|
version: "2.2.0+31"
|
||||||
m3_lightmeter_resources:
|
m3_lightmeter_resources:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "/Users/vodemn/Documents/GitHub/Vodemn/m3_lightmeter_resources"
|
path: "."
|
||||||
relative: false
|
ref: "v2.3.0"
|
||||||
source: path
|
resolved-ref: a8c419f21fcda06d76d26cc2416de459f0d51a60
|
||||||
version: "2.2.0+10"
|
url: "https://github.com/vodemn/m3_lightmeter_resources"
|
||||||
|
source: git
|
||||||
|
version: "2.3.0+11"
|
||||||
macros:
|
macros:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
10
pubspec.yaml
10
pubspec.yaml
|
@ -33,11 +33,12 @@ dependencies:
|
||||||
m3_lightmeter_iap:
|
m3_lightmeter_iap:
|
||||||
git:
|
git:
|
||||||
url: "https://github.com/vodemn/m3_lightmeter_iap"
|
url: "https://github.com/vodemn/m3_lightmeter_iap"
|
||||||
ref: v2.2.0
|
branch: main
|
||||||
m3_lightmeter_resources:
|
m3_lightmeter_resources:
|
||||||
git:
|
git:
|
||||||
url: "https://github.com/vodemn/m3_lightmeter_resources"
|
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
|
material_color_utilities: 0.12.0
|
||||||
package_info_plus: 8.1.3
|
package_info_plus: 8.1.3
|
||||||
permission_handler: 11.3.1
|
permission_handler: 11.3.1
|
||||||
|
@ -47,7 +48,6 @@ dependencies:
|
||||||
url_launcher_ios: 6.3.2
|
url_launcher_ios: 6.3.2
|
||||||
uuid: 4.5.1
|
uuid: 4.5.1
|
||||||
vibration: 2.0.1
|
vibration: 2.0.1
|
||||||
map_launcher: 3.2.0
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
args: 2.6.0
|
args: 2.6.0
|
||||||
|
@ -68,10 +68,6 @@ dev_dependencies:
|
||||||
|
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
geolocator_android: 4.6.1
|
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
|
material_color_utilities: 0.11.1
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
|
|
|
@ -29,10 +29,8 @@ void main() {
|
||||||
() => storageService.updatePhoto(
|
() => storageService.updatePhoto(
|
||||||
id: any<String>(named: 'id'),
|
id: any<String>(named: 'id'),
|
||||||
note: any<String>(named: 'note'),
|
note: any<String>(named: 'note'),
|
||||||
apertureValue: any<ApertureValue>(named: 'apertureValue'),
|
apertureValue: any<Optional<ApertureValue>?>(named: 'apertureValue'),
|
||||||
removeApertureValue: any<bool>(named: 'removeApertureValue'),
|
shutterSpeedValue: any<Optional<ShutterSpeedValue>?>(named: 'shutterSpeedValue'),
|
||||||
shutterSpeedValue: any<ShutterSpeedValue>(named: 'shutterSpeedValue'),
|
|
||||||
removeShutterSpeedValue: any<bool>(named: 'removeShutterSpeedValue'),
|
|
||||||
),
|
),
|
||||||
).thenAnswer((_) async {});
|
).thenAnswer((_) async {});
|
||||||
when(() => storageService.deletePhoto(any<String>())).thenAnswer((_) async {});
|
when(() => storageService.deletePhoto(any<String>())).thenAnswer((_) async {});
|
||||||
|
@ -155,8 +153,8 @@ void main() {
|
||||||
() => storageService.updatePhoto(
|
() => storageService.updatePhoto(
|
||||||
id: updatedPhoto.id,
|
id: updatedPhoto.id,
|
||||||
note: 'Updated note',
|
note: 'Updated note',
|
||||||
removeApertureValue: true,
|
apertureValue: const Optional(null),
|
||||||
removeShutterSpeedValue: true,
|
shutterSpeedValue: const Optional(null),
|
||||||
),
|
),
|
||||||
).called(1);
|
).called(1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue