decode method

  1. @override
FacilitySearchModel decode(
  1. Object? value,
  2. DecodingContext context
)
inherited

Implementation

@override
T decode(Object? value, DecodingContext context) {
  var map = value.checked<Map<String, dynamic>>();
  if (_subMappers.isNotEmpty) {
    for (var m in _subMappers) {
      if (m.canDecode(map)) {
        return m.decoder(map, m.inherit(context));
      }
    }
  }
  if (_defaultSubMapper != null) {
    return _defaultSubMapper!
        .decoder(map, _defaultSubMapper!.inherit(context));
  }
  return super.decode(map, context);
}