old method

dynamic old(
  1. String key, [
  2. Object? defaultValue
])

The old input of key from the request before, see flashErrors.

Implementation

dynamic old(String key, [Object? defaultValue]) {
  Object? input = get(oldInputKey);
  if (input is Map) return input[key] ?? defaultValue;
  return defaultValue;
}