queryParameters method

dynamic queryParameters({
  1. String? key,
})

Returns the queryParameters passed to a page e.g. /my-page?hello=world

Implementation

dynamic queryParameters({String? key}) {
  if (_queryParameters == null) {
    return null;
  }

  dynamic data = _queryParameters!.data;
  if (key != null && data is Map) {
    if (data.containsKey(key)) {
      return data[key];
    } else {
      return null;
    }
  }

  return data;
}