findPropertyAs<T> method

T? findPropertyAs<T>(
  1. List<String> keys,
  2. T? mapper(
    1. Object? v
    ), [
  3. T? def
])

Finds a property with keys.

mapper Maps the value to T. def The default value if key not found.

Implementation

// ignore: use_function_type_syntax_for_parameters
T? findPropertyAs<T>(List<String> keys, T? mapper(Object? v), [T? def]) {
  var val = findKeyValue(_map, keys, true);
  return val != null ? mapper(val) : def;
}