mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-08-04 20:26:42 +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,
|
||||
coordinates: coordinates,
|
||||
);
|
||||
//await widget.storageService.addPhoto(photo);
|
||||
await widget.storageService.addPhoto(photo);
|
||||
_photos[photo.id] = photo;
|
||||
setState(() {});
|
||||
} else {
|
||||
|
|
|
@ -23,6 +23,8 @@ class LogbookPhotoEditBloc extends Bloc<LogbookPhotoEditEvent, LogbookPhotoEditS
|
|||
iso: photo.iso,
|
||||
nd: photo.nd,
|
||||
coordinates: photo.coordinates,
|
||||
aperture: photo.apertureValue,
|
||||
shutterSpeed: photo.shutterSpeedValue,
|
||||
note: photo.note,
|
||||
canSave: false,
|
||||
),
|
||||
|
@ -46,7 +48,7 @@ class LogbookPhotoEditBloc extends Bloc<LogbookPhotoEditEvent, LogbookPhotoEditS
|
|||
}
|
||||
|
||||
Future<void> _onApertureChanged(LogbookPhotoApertureChangedEvent event, Emitter emit) async {
|
||||
_newPhoto = _newPhoto.copyWith(apertureValue: event.aperture);
|
||||
_newPhoto = _newPhoto.copyWith(apertureValue: Optional(event.aperture));
|
||||
emit(
|
||||
state.copyWith(
|
||||
aperture: event.aperture,
|
||||
|
@ -56,7 +58,7 @@ class LogbookPhotoEditBloc extends Bloc<LogbookPhotoEditEvent, LogbookPhotoEditS
|
|||
}
|
||||
|
||||
Future<void> _onShutterSpeedChanged(LogbookPhotoShutterSpeedChangedEvent event, Emitter emit) async {
|
||||
_newPhoto = _newPhoto.copyWith(shutterSpeedValue: event.shutterSpeed);
|
||||
_newPhoto = _newPhoto.copyWith(shutterSpeedValue: Optional(event.shutterSpeed));
|
||||
emit(
|
||||
state.copyWith(
|
||||
shutterSpeed: event.shutterSpeed,
|
||||
|
|
Loading…
Reference in a new issue