resolve method
Implementation
@override
Future<String?> resolve(List<String> key) async {
var joinedKey = key.join(".");
var argSource = DarwinSystem.internalInstance.applicationArgs;
var queue = Queue.of(argSource);
while (queue.isNotEmpty) {
var next = queue.removeFirst();
if (next.startsWith("--$joinedKey=")) {
var value = next.replaceFirst("--$joinedKey=", "");
return value;
} else if (queue.isNotEmpty && next == "--$joinedKey") {
var value = queue.removeFirst();
return value;
} else if (next == "--$joinedKey") {
return "true";
} else if (next == "--no-$joinedKey") {
return "false";
}
}
return null;
}