EncodeHint class

These are a set of hints that you may pass to Writers to specify their behavior.

Constructors

EncodeHint({int? errorCorrection, ErrorCorrectionLevel? errorCorrectionLevel, String? characterSet, SymbolShapeHint? dataMatrixShape, bool dataMatrixCompact = false, Dimension? minSize, Dimension? maxSize, int? margin, bool pdf417Compact = false, Compaction? pdf417Compaction, Dimensions? pdf417Dimensions, bool pdf417AutoEci = false, int? aztecLayers, int? qrVersion, int? qrMaskPattern, bool qrCompact = false, bool gs1Format = false, String? forceCodeSet, bool forceC40 = false, bool code128Compact = false})
const

Properties

aztecLayers int?
Specifies the required number of layers for an Aztec code. A negative number (-1, -2, -3, -4) specifies a compact Aztec code. 0 indicates to use the minimum number of layers (the default). A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code. (Type Integer, or String representation of the integer value).
final
characterSet String?
Specifies what character encoding to use where applicable (type String)
final
code128Compact bool
Specifies whether to use compact mode for Code-128 code (type bool, or "true" or "false" String value) This can yield slightly smaller bar codes. This option and forceCodeSet are mutually exclusive.
final
dataMatrixCompact bool
Specifies whether to use compact mode for Data Matrix (type bool, or "true" or "false" String value) The compact encoding mode also supports the encoding of characters that are not in the ISO-8859-1 character set via ECIs. Please note that in that case, the most compact character encoding is chosen for characters in the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by means of the {@link #CHARACTER_SET} encoding hint. Compact encoding also provides GS1-FNC1 support when {@link #GS1_FORMAT} is selected. In this case group-separator character (ASCII 29 decimal) can be used to encode the positions of FNC1 codewords for the purpose of delimiting AIs. This option and FORCE_C40 are mutually exclusive.
final
dataMatrixShape SymbolShapeHint?
Specifies the matrix shape for Data Matrix (type SymbolShapeHint)
final
errorCorrection int?
Specifies what degree of error correction to use, for example in QR Codes. Type depends on the encoder. For example for QR codes it's type ErrorCorrectionLevel. For Aztec it is of type Integer, representing the minimal percentage of error correction words. For PDF417 it is of type Integer, valid values being 0 to 8. In all cases, it can also be a String representation of the desired value as well. Note: an Aztec symbol should have a minimum of 25% EC words.
final
errorCorrectionLevel ErrorCorrectionLevel?
for qrcode
final
forceC40 bool
Forces C40 encoding for data-matrix (type bool, or "true" or "false" String value). This option and dataMatrixCompact are mutually exclusive.
final
forceCodeSet String?
Forces which encoding will be used. Currently only used for Code-128 code sets (Type String). Valid values are "A", "B", "C". This option and code128Compact are mutually exclusive.
final
gs1Format bool
Specifies whether the data should be encoded to the GS1 standard (type bool, or "true" or "false" String value).
final
hashCode int
The hash code for this object.
no setterinherited
margin int?
Specifies margin, in pixels, to use when generating the barcode. The meaning can vary by format; for example it controls margin before and after the barcode horizontally for most 1D formats. (Type Integer, or String representation of the integer value).
final
maxSize Dimension?
Specifies a maximum barcode size (type Dimension). Only applicable to Data Matrix now.
final
minSize Dimension?
Specifies a minimum barcode size (type Dimension). Only applicable to Data Matrix now.
final
pdf417AutoEci bool
Specifies whether to automatically insert ECIs when encoding PDF417 (type bool).
final
pdf417Compact bool
Specifies whether to use compact mode for PDF417 (type bool, or "true" or "false" String value).
final
pdf417Compaction Compaction?
Specifies what compaction mode to use for PDF417 (type Compaction or String value of one of its enum values).
final
pdf417Dimensions → Dimensions?
Specifies the minimum and maximum number of rows and columns for PDF417 (type Dimensions).
final
qrCompact bool
Specifies whether to use compact mode for QR code (type bool, or "true" or "false" String value) Please note that when compaction is performed, the most compact character encoding is chosen for characters in the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by means of the Encoding encoding hint.
final
qrMaskPattern int?
Specifies the QR code mask pattern to be used. Allowed values are 0..QRCode.NUM_MASK_PATTERNS-1. By default the code will automatically select the optimal mask pattern. (Type Integer, or String representation of the integer value).
final
qrVersion int?
Specifies the exact version of QR code to be encoded. (Type Integer, or String representation of the integer value).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited