addSubMapper method

  1. @protected
void addSubMapper(
  1. SubClassMapperBase<DashboardResponseModel> mapper
)
inherited

Adds a subclass mapper to this mapper.

Implementation

@protected
void addSubMapper(SubClassMapperBase<T> mapper) {
  assert(identical(mapper.superMapper, this));
  if (identical(mapper.discriminatorValue, MappingFlags.useAsDefault)) {
    assert(_defaultSubMapper == null,
        'Cannot have multiple default mappers for a polymorphic class.');
    _defaultSubMapper = mapper;
  } else {
    _subMappers.add(mapper);
  }
}