mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-24 00:10:47 +00:00
24 lines
557 B
Dart
24 lines
557 B
Dart
enum BuildType { dev, prod }
|
|
|
|
class Environment {
|
|
final BuildType buildType;
|
|
final bool hasLightSensor;
|
|
|
|
const Environment({
|
|
required this.buildType,
|
|
this.hasLightSensor = false,
|
|
});
|
|
|
|
const Environment.dev()
|
|
: buildType = BuildType.dev,
|
|
hasLightSensor = false;
|
|
|
|
const Environment.prod()
|
|
: buildType = BuildType.prod,
|
|
hasLightSensor = false;
|
|
|
|
Environment copyWith({bool? hasLightSensor}) => Environment(
|
|
buildType: buildType,
|
|
hasLightSensor: hasLightSensor ?? this.hasLightSensor,
|
|
);
|
|
}
|