m3_lightmeter/lib/environment.dart
Vadim 9ffb5112c1
ML-16 [Android] Implement incident light metering (#17)
* wip

* rename

* wip

* rename

* fixed camera screen layout

* omit camera measure on startup

* added calibration for light sensor

* save evsource

* Update widget_button_measure.dart

* fixed iOS init

* hide light sensor calibration on ios

* cleanup
2023-01-29 19:57:47 +03:00

33 lines
1 KiB
Dart

class Environment {
final String sourceCodeUrl;
final String issuesReportUrl;
final String contactEmail;
final bool hasLightSensor;
const Environment({
required this.sourceCodeUrl,
required this.issuesReportUrl,
required this.contactEmail,
this.hasLightSensor = false,
});
const Environment.dev()
: sourceCodeUrl = 'https://github.com/vodemn/m3_lightmeter',
issuesReportUrl = 'https://github.com/vodemn/m3_lightmeter/issues',
contactEmail = 'contact.vodemn@gmail.com',
hasLightSensor = false;
const Environment.prod()
: sourceCodeUrl = 'https://github.com/vodemn/m3_lightmeter',
issuesReportUrl = 'https://github.com/vodemn/m3_lightmeter/issues',
contactEmail = 'contact.vodemn@gmail.com',
hasLightSensor = false;
Environment copyWith({bool? hasLightSensor}) => Environment(
sourceCodeUrl: sourceCodeUrl,
issuesReportUrl: issuesReportUrl,
contactEmail: contactEmail,
hasLightSensor: hasLightSensor ?? this.hasLightSensor,
);
}