getCustomValues<T> method

HashMap<String, T> getCustomValues<T>(
  1. String serializerType
)

Some server need custom values to be added to the options. Since flutter disables reflection in favor of tree shaking, the custom values need a custom serialization process that has to be defined for each value separately. The current serializerType is passed to the custom serializer.

Implementation

HashMap<String, T> getCustomValues<T>(String serializerType) {
  var resultMap = HashMap<String, T>();
  _customSerializedOptions.forEach((key, value) {
    resultMap[key] = value(serializerType);
  });
  return resultMap;
}