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;
|
||||
await widget.storageService.updateProfile(
|
||||
id: profile.id,
|
||||
name: oldProfile.name != profile.name ? profile.name : null,
|
||||
apertureValues: oldProfile.apertureValues != profile.apertureValues ? profile.apertureValues : null,
|
||||
shutterSpeedValues:
|
||||
oldProfile.shutterSpeedValues != profile.shutterSpeedValues ? profile.shutterSpeedValues : null,
|
||||
isoValues: oldProfile.isoValues != profile.isoValues ? profile.isoValues : null,
|
||||
ndValues: oldProfile.ndValues != profile.ndValues ? profile.ndValues : null,
|
||||
lensZoom: oldProfile.lensZoom != profile.lensZoom ? profile.lensZoom : null,
|
||||
name: oldProfile.name.changedOrNull(profile.name),
|
||||
apertureValues: oldProfile.apertureValues.changedOrNull(profile.apertureValues),
|
||||
shutterSpeedValues: oldProfile.shutterSpeedValues.changedOrNull(profile.shutterSpeedValues),
|
||||
isoValues: oldProfile.isoValues.changedOrNull(profile.isoValues),
|
||||
ndValues: oldProfile.ndValues.changedOrNull(profile.ndValues),
|
||||
lensZoom: oldProfile.lensZoom.changedOrNull(profile.lensZoom),
|
||||
exposureOffset: oldProfile.exposureOffset.changedOrNull(profile.exposureOffset),
|
||||
);
|
||||
_customProfiles[profile.id] = (value: profile, isUsed: _customProfiles[profile.id]!.isUsed);
|
||||
setState(() {});
|
||||
|
@ -183,3 +183,9 @@ class EquipmentProfiles extends InheritedModel<_EquipmentProfilesModelAspect> {
|
|||
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:
|
||||
git:
|
||||
url: "https://github.com/vodemn/m3_lightmeter_iap"
|
||||
ref: v2.1.3
|
||||
ref: v2.2.0
|
||||
m3_lightmeter_resources:
|
||||
git:
|
||||
url: "https://github.com/vodemn/m3_lightmeter_resources"
|
||||
ref: v2.1.0
|
||||
ref: v2.2.0
|
||||
material_color_utilities: 0.12.0
|
||||
package_info_plus: 8.1.3
|
||||
permission_handler: 11.3.1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
defaults -currentHost write -g AppleFontSmoothing -int 0
|
||||
goldens=$(find ./test -name "*_golden_test.dart" -print)
|
||||
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
|
||||
defaults -currentHost write -g AppleFontSmoothing -int 3
|
||||
|
|
Loading…
Reference in a new issue