getParam method

Object? getParam(
  1. String key, {
  2. Object? def,
})

Retrieves the value of a parameter.

key - The key of the parameter to retrieve. def - Optional default value to return if the parameter is not found. Default is null.

Returns the value of the parameter if it exists, otherwise returns def.

Implementation

Object? getParam(String key, {Object? def}) {
  return _params[key] ?? def;
}