getParameterValue method Null safety

String? getParameterValue(
  1. String name,
  2. String url
)

Returns the value of the given url parameter from the specified url if found.

Implementation

String? getParameterValue(String name, String url) {
  var uri = Uri.dataFromString(url);
  Map<String, String> params = uri.queryParameters;
  return params[name];
}