MsgPackWriter constructor

MsgPackWriter({
  1. Map<String, dynamic> toEncodable(
    1. dynamic
    )?,
  2. List<MsgPackExtension>? extensions,
})

Builds a MsgPackWriter serializer.

  • toEncodable: A custom function the converts the object to a Map<String, dynamic> representation
  • extensions: A optional list of extensions to use

Implementation

MsgPackWriter(
    {Map<String, dynamic> Function(dynamic)? toEncodable,
    List<MsgPackExtension>? extensions})
    : _toEncodable = toEncodable ?? _defaultToEncodable,
      _extensions = [const DateTimeExtension(), ...?extensions];