parseUri function
Returns parsed Uri from value
, if value
is not a valid URI,
returns defaultValue
Implementation
Uri parseUri(dynamic value, Uri defaultValue, [int start = 0, int? end]) {
if (value == null) {
return defaultValue;
} else {
return Uri.tryParse('$value', start, end) ?? defaultValue;
}
}