Source
List<Uri> get hosts {
List<String> hostValues = values["host"] ?? ["http://localhost:8081"];
return hostValues.map((str) {
var uri = Uri.parse(str);
if (uri == null) {
throw new CLIException("Invalid Host Option", instructions: [
"Host names must identify scheme, host and port. Example: https://api.myapp.com:8000"
]);
}
return uri;
}).toList();
}