decode<R> method

R decode<R>(
  1. Map<String, dynamic> value,
  2. DecodingContext context
)

Implementation

R decode<R>(Map<String, dynamic> value, DecodingContext context) {
  DecodingOptions? options;
  if (data != null) {
    options = DecodingOptions(data: data);
  }
  var result = opt || def != null
      ? context.$dec<R?>(value[key], key, hook, options)
      : context.$dec<R>(value[key], key, hook, options);
  return result ?? (def as R);
}