parseUri static method

Uri parseUri(
  1. String authority,
  2. String path, {
  3. Map<String, dynamic>? queryparams,
})

Implementation

static Uri parseUri(String authority, String path, {Map<String, dynamic>? queryparams}) {
  var uri = Uri.parse(authority);
  if (uri.scheme == "https") {
    return Uri.https(uri.authority, path, queryparams);
  }
  return Uri.http(uri.authority, path, queryparams);
}