encoder abstract method

ContentEncoder<Content> encoder({
  1. StringSink? buffer,
  2. int? decimals,
  3. Map<String, dynamic>? options,
})

Returns a text format encoder for Content.

When an optional buffer is given, then representations are written into it (without clearing any content it might already contain).

After writing content objects into an encoder, the text representation can be accessed using toText() of the encoder (or via buffer when such is given).

Use decimals to set a number of decimals (not applied if no decimals).

Other format or encoder implementation specific options can be set by options.

Implementation

ContentEncoder<Content> encoder({
  StringSink? buffer,
  int? decimals,
  Map<String, dynamic>? options,
});