Encoder class
@author satorux@google.com (Satoru Takabayashi) - creator @author dswitkin@google.com (Daniel Switkin) - ported from C++
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
Static Properties
- defaultByteModeEncoding → Encoding
-
final
Static Methods
-
append8BitBytes(
String content, BitArray bits, Encoding encoding) → void -
appendAlphanumericBytes(
String content, BitArray bits) → void -
appendBytes(
String content, Mode mode, BitArray bits, Encoding encoding) → void - Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits".
-
appendKanjiBytes(
String content, BitArray bits) → void -
appendLengthInfo(
int numLetters, Version version, Mode mode, BitArray bits) → void - Append length info. On success, store the result in "bits".
-
appendModeInfo(
Mode mode, BitArray bits) → void - Append mode info. On success, store the result in "bits".
-
appendNumericBytes(
String content, BitArray bits) → void -
chooseMode(
String content) → Mode -
encode(
String content, [ErrorCorrectionLevel ecLevel = ErrorCorrectionLevel.H, EncodeHint? hints]) → QRCode -
generateECBytes(
Uint8List dataBytes, int numEcBytesInBlock) → Uint8List -
getAlphanumericCode(
int code) → int - @return the code point of the table used in alphanumeric mode or -1 if there is no corresponding code in the table.
-
getNumDataBytesAndNumECBytesForBlockID(
int numTotalBytes, int numDataBytes, int numRSBlocks, int blockID, List< int> numDataBytesInBlock, List<int> numECBytesInBlock) → void - Get number of data bytes and number of error correction bytes for block id "blockID". Store the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of JISX0510:2004 (p.30)
-
interleaveWithECBytes(
BitArray bits, int numTotalBytes, int numDataBytes, int numRSBlocks) → BitArray - Interleave "bits" with corresponding error correction bytes. On success, store the result in "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details.
-
isOnlyDoubleByteKanji(
String content) → bool -
terminateBits(
int numDataBytes, BitArray bits) → void - Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24).
-
willFit(
int numInputBits, Version version, ErrorCorrectionLevel ecLevel) → bool - @return true if the number of input bits will fit in a code with the specified version and error correction level.