mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-07-11 00:20:41 +00:00
use latest m3 packages
This commit is contained in:
parent
f7b2826345
commit
8bf48dd709
3 changed files with 16 additions and 10 deletions
|
@ -73,13 +73,13 @@ class EquipmentProfilesProviderState extends State<EquipmentProfilesProvider> {
|
||||||
final oldProfile = _customProfiles[profile.id]!.value;
|
final oldProfile = _customProfiles[profile.id]!.value;
|
||||||
await widget.storageService.updateProfile(
|
await widget.storageService.updateProfile(
|
||||||
id: profile.id,
|
id: profile.id,
|
||||||
name: oldProfile.name != profile.name ? profile.name : null,
|
name: oldProfile.name.changedOrNull(profile.name),
|
||||||
apertureValues: oldProfile.apertureValues != profile.apertureValues ? profile.apertureValues : null,
|
apertureValues: oldProfile.apertureValues.changedOrNull(profile.apertureValues),
|
||||||
shutterSpeedValues:
|
shutterSpeedValues: oldProfile.shutterSpeedValues.changedOrNull(profile.shutterSpeedValues),
|
||||||
oldProfile.shutterSpeedValues != profile.shutterSpeedValues ? profile.shutterSpeedValues : null,
|
isoValues: oldProfile.isoValues.changedOrNull(profile.isoValues),
|
||||||
isoValues: oldProfile.isoValues != profile.isoValues ? profile.isoValues : null,
|
ndValues: oldProfile.ndValues.changedOrNull(profile.ndValues),
|
||||||
ndValues: oldProfile.ndValues != profile.ndValues ? profile.ndValues : null,
|
lensZoom: oldProfile.lensZoom.changedOrNull(profile.lensZoom),
|
||||||
lensZoom: oldProfile.lensZoom != profile.lensZoom ? profile.lensZoom : null,
|
exposureOffset: oldProfile.exposureOffset.changedOrNull(profile.exposureOffset),
|
||||||
);
|
);
|
||||||
_customProfiles[profile.id] = (value: profile, isUsed: _customProfiles[profile.id]!.isUsed);
|
_customProfiles[profile.id] = (value: profile, isUsed: _customProfiles[profile.id]!.isUsed);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
@ -183,3 +183,9 @@ class EquipmentProfiles extends InheritedModel<_EquipmentProfilesModelAspect> {
|
||||||
const DeepCollectionEquality().equals(oldWidget.profiles, profiles));
|
const DeepCollectionEquality().equals(oldWidget.profiles, profiles));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension on Object {
|
||||||
|
T? changedOrNull<T>(T newValue) {
|
||||||
|
return this != newValue ? newValue : null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -32,11 +32,11 @@ 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.1.3
|
ref: v2.2.0
|
||||||
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.1.0
|
ref: v2.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
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
defaults -currentHost write -g AppleFontSmoothing -int 0
|
defaults -currentHost write -g AppleFontSmoothing -int 0
|
||||||
goldens=$(find ./test -name "*_golden_test.dart" -print)
|
goldens=$(find ./test -name "*_golden_test.dart" -print)
|
||||||
for f in $goldens; do
|
for f in $goldens; do
|
||||||
flutter test "$f" --dart-define cameraStubImage=assets/camera_stub_image.jpg --update-goldens
|
fvm flutter test "$f" --dart-define cameraStubImage=assets/camera_stub_image.jpg --update-goldens
|
||||||
done
|
done
|
||||||
defaults -currentHost write -g AppleFontSmoothing -int 3
|
defaults -currentHost write -g AppleFontSmoothing -int 3
|
||||||
|
|
Loading…
Reference in a new issue