MConfigOption.init constructor
MConfigOption.init({})
Implementation
MConfigOption.init({
String env = "",
this.configPath = "configs",
required this.configName,
this.configType = "yaml",
}) {
String e = Platform.environment["ENV"] ?? "";
if (env.isNotEmpty) {
e = env;
}
if (e.isEmpty || configName.isEmpty) {
throw "invalid config option";
}
this.env = e;
}