mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
lints
This commit is contained in:
parent
c8ab4a362e
commit
44fa4460fd
3 changed files with 28 additions and 23 deletions
|
@ -132,11 +132,13 @@ class MeteringBloc extends Bloc<MeteringEvent, MeteringState> {
|
|||
_meteringInteractor.quickVibration();
|
||||
_communicationBloc.add(const communication_events.MeasureEvent());
|
||||
_isMeteringInProgress = true;
|
||||
emit(LoadingState(
|
||||
emit(
|
||||
LoadingState(
|
||||
film: _film,
|
||||
iso: _iso,
|
||||
nd: _nd,
|
||||
));
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _updateMeasurements() => _handleEv100(_ev100);
|
||||
|
@ -153,27 +155,31 @@ class MeteringBloc extends Bloc<MeteringEvent, MeteringState> {
|
|||
_meteringInteractor.responseVibration();
|
||||
_ev100 = event.ev100;
|
||||
final ev = event.ev100 + log2(_iso.value / 100) - _nd.stopReduction;
|
||||
emit(MeteringDataState(
|
||||
emit(
|
||||
MeteringDataState(
|
||||
ev: ev,
|
||||
film: _film,
|
||||
iso: _iso,
|
||||
nd: _nd,
|
||||
exposurePairs: _buildExposureValues(ev),
|
||||
continuousMetering: _isMeteringInProgress,
|
||||
));
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _onMeasureError(MeasureErrorEvent _, Emitter emit) {
|
||||
_meteringInteractor.errorVibration();
|
||||
_ev100 = null;
|
||||
emit(MeteringDataState(
|
||||
emit(
|
||||
MeteringDataState(
|
||||
ev: null,
|
||||
film: _film,
|
||||
iso: _iso,
|
||||
nd: _nd,
|
||||
exposurePairs: const [],
|
||||
continuousMetering: _isMeteringInProgress,
|
||||
));
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
List<ExposurePair> _buildExposureValues(double ev) {
|
||||
|
|
|
@ -193,7 +193,7 @@ class CameraContainerBloc extends EvSourceBlocBase<CameraContainerEvent, CameraC
|
|||
final apertureValueRatio = (tags["EXIF FNumber"]?.values as IfdRatios?)?.ratios.first;
|
||||
final speedValueRatio = (tags["EXIF ExposureTime"]?.values as IfdRatios?)?.ratios.first;
|
||||
if (iso == null || apertureValueRatio == null || speedValueRatio == null) {
|
||||
log('Error parsing EXIF: ${tags.keys.toString()}');
|
||||
log('Error parsing EXIF: ${tags.keys}');
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ import 'package:clipboard/clipboard.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:lightmeter/environment.dart';
|
||||
import 'package:lightmeter/generated/l10n.dart';
|
||||
import 'package:lightmeter/res/dimens.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
|
|
Loading…
Reference in a new issue