findOrNull<T extends Object?> method

T? findOrNull<T extends Object?>({
  1. Object? key,
  2. T? defaultValue,
  3. ObjectBuilder<T>? builder,
})

Implementation

T? findOrNull<T extends Object?>({
  Object? key,
  T? defaultValue,
  ObjectBuilder<T>? builder,
}) {
  final root = this;
  final value = key == null
      ? root
      : root is Map
          ? root[key]
          : null;

  return _v(value, builder) ?? defaultValue;
}