getParameter<T> method

T? getParameter<T>(
  1. int index, [
  2. T? def,
  3. T parser(
    1. Object v
    )?
])

Implementation

T? getParameter<T>(int index, [T? def, T Function(Object v)? parser]) {
  if (parameters == null || index < 0) return def;
  if (index < parameters!.length) {
    var val = parameters![index];
    if (val != null) {
      return parser != null ? parser(val) : val;
    } else {
      return def;
    }
  }
  return def;
}