encodeMap<V> method

Map<String, dynamic> encodeMap<V>(
  1. V object, [
  2. EncodingOptions? options
])
inherited

Implementation

Map<String, dynamic> encodeMap<V>(V object, [EncodingOptions? options]) {
  var value = encodeValue<V>(object, options);
  if (value is Map<String, dynamic>) {
    return value;
  } else {
    throw MapperException.incorrectEncoding(
        object.runtimeType, 'Map', value.runtimeType);
  }
}