MessageSerializer constructor

const MessageSerializer({
  1. DecoderCallback decoder = jsonDecode,
  2. EncoderCallback encoder = jsonEncode,
})

Default constructor returning the singleton instance of this class.

Implementation

const MessageSerializer({
  DecoderCallback decoder = jsonDecode,
  EncoderCallback encoder = jsonEncode,
})  : _decoder = decoder,
      _encoder = encoder;