subOrSelfFor method

MapperBase<Object>? subOrSelfFor(
  1. dynamic value
)
inherited

Implementation

MapperBase<Object>? subOrSelfFor(dynamic value) {
  MapperBase<Object>? m;
  if (_subMappers.isNotEmpty) {
    m = _subMappers.where((m) => m.isFor(value)).firstOrNull;
  }
  if (m == null &&
      _defaultSubMapper != null &&
      _defaultSubMapper!.isFor(value)) {
    m = _defaultSubMapper;
  }
  return m;
}