toUri static method

Uri toUri(
  1. Object url
)

Converts a String or Uri to a Uri object

Implementation

static Uri toUri(Object url) {
  if (url is String) {
    return Uri.parse(url);
  } else if (url is Uri) {
    return url;
  } else {
    throw ArgumentError('URL must be a String or Uri');
  }
}