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;

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-convert/AsciiCodec/AsciiCodec.html