tryGetFromJson<A> method

A? tryGetFromJson<A>(
  1. String key,
  2. A fromJson(
    1. Map<String, Object?>
    ), [
  3. TryGet log = TryGet.optional
])

Implementation

A? tryGetFromJson<A>(
  String key,
  A Function(Map<String, Object?>) fromJson, [
  TryGet log = TryGet.optional,
]) {
  final value = tryGetMap<String, Object?>(key, log);

  return value != null ? fromJson(value) : null;
}