get<T> method Null safety

T? get<T>(
  1. dynamic key
)

Implementation

T? get<T>(key) {
  if (key == "id") {
    if (T == String) {
      return id as T?;
    } else {
      return id as T?;
    }
  }

  if (key == "record") return record as T?;
  return args[key?.toString()] as T?;
}