toPath method
Returns the path representation of this given args
.
Implementation
@override
String toPath(Map<String, String> args) {
final value = args[name];
if (value != null) {
if (!regExp.hasMatch(value)) {
throw ArgumentError.value('$args', 'args',
'Expected "$name" to match "$pattern", but got "$value"');
}
return value;
} else {
throw ArgumentError.value('$args', 'args', 'Expected key "$name"');
}
}