getObj<T> static method

T getObj<T>(
  1. String key,
  2. T f(
    1. Map v
    ), {
  3. required T defValue,
})

get obj.

Implementation

static T getObj<T>(String key, T Function(Map v) f, {required T defValue}) {
  Map? map = getObject(key);
  return map.isEmpty ? defValue : f(map);
}