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, which are byte values greater than 127. If allowing invalid values, invalid values will be decoded to the Unicode Replacement character (U+FFFD). If not, a FormatException is be thrown. Calls to the decode method can choose to override this default.

Encoders will not accept invalid (non-ASCII) characters.

Implementation

const AsciiCodec({this._allowInvalid = false});