AsciiCodec constructor

const AsciiCodec({
  1. bool allowInvalid = false,
})

Instantiates a new AsciiCodec.

If allowInvalid is true, the decode method and the converter returned by decoder will default to allowing invalid values. If allowing invalid values, the values will be decoded into the Unicode Replacement character (U+FFFD). If not, an exception will be thrown. Calls to the decode method can choose to override this default.

Encoders will not accept invalid (non ASCII) characters.

Implementation

const AsciiCodec({bool allowInvalid = false}) : _allowInvalid = allowInvalid;