mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-08-05 04:36:41 +00:00
fixed updating photos
This commit is contained in:
parent
812d3b281a
commit
02f60956e3
2 changed files with 5 additions and 3 deletions
|
@ -83,7 +83,7 @@ class LogbookPhotosProviderState extends State<LogbookPhotosProvider> {
|
||||||
nd: nd,
|
nd: nd,
|
||||||
coordinates: coordinates,
|
coordinates: coordinates,
|
||||||
);
|
);
|
||||||
//await widget.storageService.addPhoto(photo);
|
await widget.storageService.addPhoto(photo);
|
||||||
_photos[photo.id] = photo;
|
_photos[photo.id] = photo;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -23,6 +23,8 @@ class LogbookPhotoEditBloc extends Bloc<LogbookPhotoEditEvent, LogbookPhotoEditS
|
||||||
iso: photo.iso,
|
iso: photo.iso,
|
||||||
nd: photo.nd,
|
nd: photo.nd,
|
||||||
coordinates: photo.coordinates,
|
coordinates: photo.coordinates,
|
||||||
|
aperture: photo.apertureValue,
|
||||||
|
shutterSpeed: photo.shutterSpeedValue,
|
||||||
note: photo.note,
|
note: photo.note,
|
||||||
canSave: false,
|
canSave: false,
|
||||||
),
|
),
|
||||||
|
@ -46,7 +48,7 @@ class LogbookPhotoEditBloc extends Bloc<LogbookPhotoEditEvent, LogbookPhotoEditS
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _onApertureChanged(LogbookPhotoApertureChangedEvent event, Emitter emit) async {
|
Future<void> _onApertureChanged(LogbookPhotoApertureChangedEvent event, Emitter emit) async {
|
||||||
_newPhoto = _newPhoto.copyWith(apertureValue: event.aperture);
|
_newPhoto = _newPhoto.copyWith(apertureValue: Optional(event.aperture));
|
||||||
emit(
|
emit(
|
||||||
state.copyWith(
|
state.copyWith(
|
||||||
aperture: event.aperture,
|
aperture: event.aperture,
|
||||||
|
@ -56,7 +58,7 @@ class LogbookPhotoEditBloc extends Bloc<LogbookPhotoEditEvent, LogbookPhotoEditS
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _onShutterSpeedChanged(LogbookPhotoShutterSpeedChangedEvent event, Emitter emit) async {
|
Future<void> _onShutterSpeedChanged(LogbookPhotoShutterSpeedChangedEvent event, Emitter emit) async {
|
||||||
_newPhoto = _newPhoto.copyWith(shutterSpeedValue: event.shutterSpeed);
|
_newPhoto = _newPhoto.copyWith(shutterSpeedValue: Optional(event.shutterSpeed));
|
||||||
emit(
|
emit(
|
||||||
state.copyWith(
|
state.copyWith(
|
||||||
shutterSpeed: event.shutterSpeed,
|
shutterSpeed: event.shutterSpeed,
|
||||||
|
|
Loading…
Reference in a new issue