mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-23 16:00:41 +00:00
cc9f162933
* added stub `FilmsProvider` * moved dialogs to the shared folder * typo * separated `EquipmentSettingsSection` * copy * `IAPBuilder` -> `IAPListTile` * moved `Film` to resources repo * fixed films selection * untied iso and selected film * removed film from exposure pairs building * indicate push/pull * copy * Update .gitignore * fixed extreme exposure pairs reciprocity display * sync with iap changes * sync iap stub with iap changes * added reciprocity description * added workspace file * Update .gitignore
36 lines
835 B
Dart
36 lines
835 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';
|
|
|
|
@immutable
|
|
abstract class MeteringState {
|
|
final double? ev100;
|
|
final IsoValue iso;
|
|
final NdValue nd;
|
|
final bool isMetering;
|
|
|
|
const MeteringState({
|
|
this.ev100,
|
|
required this.iso,
|
|
required this.nd,
|
|
required this.isMetering,
|
|
});
|
|
}
|
|
|
|
class LoadingState extends MeteringState {
|
|
const LoadingState({
|
|
required super.iso,
|
|
required super.nd,
|
|
}) : super(isMetering: true);
|
|
}
|
|
|
|
class MeteringDataState extends MeteringState {
|
|
const MeteringDataState({
|
|
required super.ev100,
|
|
required super.iso,
|
|
required super.nd,
|
|
required super.isMetering,
|
|
});
|
|
|
|
double? get ev => ev100 != null ? ev100! + log2(iso.value / 100) - nd.stopReduction : null;
|
|
bool get hasError => ev == null;
|
|
}
|