BarcodeCode128 class
Code128 Barcode
Code 128 is a high-density linear barcode symbology defined in ISO/IEC 15417:2007. It is used for alphanumeric or numeric-only barcodes.
It can encode all 128 characters of ASCII and, by use of an extension symbol, the Latin-1 characters defined in ISO/IEC 8859-1.
The GS1-128 is an application standard of the GS1. It uses a series of Application Identifiers to include additional data such as best before dates, batch numbers, quantities, weights and many other attributes needed by the user.
Constructors
Properties
- 
  charSet
  → Iterable<int> 
- 
  Returns the list of accepted codePoints for this CodeType
  no setteroverride
- escapes → bool
- 
  Use {1} for fnc1, {2} for fnc2, {3} for fnc3, and {4} for fnc4
  final
- hashCode → int
- 
  The hash code for this object.
  no setterinherited
- isGS1 → bool
- 
  Generate a GS1-128 Barcode
  final
- maxLength → int
- 
  Returns maximum number of characters this CodeType can encode
  no setterinherited
- minLength → int
- 
  Returns minimum number of characters this CodeType can encode
  no setterinherited
- name → String
- 
  Returns the name of this CodeType
  no setteroverride
- runtimeType → Type
- 
  A representation of the runtime type of the object.
  no setterinherited
- useCode128A → bool
- 
  Use Code 128 A table
  final
- useCode128B → bool
- 
  Use Code 128 B table
  final
- useCode128C → bool
- 
  Use Code 128 C table
  final
Methods
- 
  adaptData(String data, [bool text = false]) → String 
- Update the string to insert FNC1
- 
  add(int data, int count) → Iterable< bool> 
- 
  Build a stream of bool that represents a white or black bar
from a bit encoded int with count as the number of bars to draw
  inherited
- 
  convert(String data) → Iterable< bool> 
- 
  Actual barcode computation method, returns a stream of bool
which represents the presence or absence of a bar
  override
- 
  getHeight(int index, int count, double width, double height, double fontHeight, double textPadding, bool drawText) → double 
- 
  Get the bar height for a specific index
  inherited
- 
  getText(String data) → String 
- 
  Get the generated texts, for testing purposes
  inherited
- 
  isValid(String data) → bool 
- 
  Check if the Barcode is valid
  inherited
- 
  isValidBytes(Uint8List data) → bool 
- 
  Check if the Barcode is valid
  inherited
- 
  make(String data, {required double width, required double height, bool drawText = false, double? fontHeight, double? textPadding}) → Iterable< BarcodeElement> 
- 
  Main method to produce the barcode graphic description.
Returns a stream of drawing operations required to properly
display the barcode as a UTF-8 string.
  inherited
- 
  makeBytes(Uint8List data, {required double width, required double height, bool drawText = false, double? fontHeight, double? textPadding}) → Iterable< BarcodeElement> 
- 
  Generate the barcode graphic description like make but takes a
Uint8List data.
  inherited
- 
  makeText(String data, double width, double height, double fontHeight, double textPadding, double lineWidth) → Iterable< BarcodeElement> 
- 
  Stream the text operations required to draw the
barcode texts. This is automatically called by make
  override
- 
  marginLeft(bool drawText, double width, double height, double fontHeight, double textPadding) → double 
- 
  Margin before the first bar
  inherited
- 
  marginRight(bool drawText, double width, double height, double fontHeight, double textPadding) → double 
- 
  Margin after the last bar
  inherited
- 
  marginTop(bool drawText, double width, double height, double fontHeight, double textPadding) → double 
- 
  Margin at the top of the barcode
  inherited
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a nonexistent method or property is accessed.
  inherited
- 
  shortestCode(List< int> data) → Iterable<int> 
- Find the shortest code using a mix of tables A B or C
- 
  toHex(String data) → String 
- 
  Computes a hexadecimal representation of the barcode, mostly for
testing purposes
  inherited
- 
  toString() → String 
- 
  A string representation of this object.
  inherited
- 
  toSvg(String data, {double x = 0, double y = 0, double width = 200, double height = 80, bool drawText = true, String fontFamily = 'monospace', double? fontHeight, double? textPadding, int color = 0x000000, bool fullSvg = true, double baseline = .75}) → String 
- 
  Create an SVG file with this Barcode from String data
  inherited
- 
  toSvgBytes(Uint8List data, {double x = 0, double y = 0, double width = 200, double height = 80, bool drawText = true, String fontFamily = 'monospace', double? fontHeight, double? textPadding, int color = 0x000000, bool fullSvg = true, double baseline = .75}) → String 
- 
  Create an SVG file with this Barcode from Uint8List data
  inherited
- 
  verify(String data) → void 
- 
  Check if the Barcode is valid. Throws BarcodeException with a proper
message in case of error
  inherited
- 
  verifyBytes(Uint8List data) → void 
- 
  Check if the Barcode is valid. Throws BarcodeException with a proper
message in case of error
  override
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  inherited