BarcodeCaption class final

Text drawn with a barcode: BarcodeStyle.title above it, BarcodeStyle.caption under it. On screen and in the PNG and SVG exports alike.

Sizes are fractions of the code's width without its quiet zone, so a 1024-pixel export looks like the screen. The text keeps out of the quiet zone above and below the code: a gap smaller than it grows to it.

Annotations

Constructors

BarcodeCaption(String text, {double size = 0.09, TextStyle? style, TextAlign align = TextAlign.center, double gap = 0.05, int maxLines = 2, double letterSpacing = 0})
Creates a caption. text may hold line breaks; longer lines wrap to the width of the code with its quiet zone (inside a BarcodeCard, to the card's width without its padding), up to maxLines, and align aligns to that width.
const

Properties

align → TextAlign
Alignment within the width the text wraps to (see BarcodeCaption.new).
final
gap → double
Space between the text and the code, as a fraction of the code's width; at least the code's quiet zone, if it has one.
final
hashCode → int
The hash code for this object.
no setteroverride
letterSpacing → double
Space added between letters, as a fraction of the font size (like CSS em): 0.1 spreads @HANDLE a little. Negative values bring letters closer.
final
maxLines → int
Lines at most; more are cut with an ellipsis.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → double
Font size, as a fraction of the code's width.
final
style → TextStyle?
Color, weight, font family and the like. TextStyle.fontSize and TextStyle.letterSpacing are ignored: the text scales with the code, so they are size and letterSpacing. Without a color, the code's: its BarcodeStyle.color, or the first color of its gradient. Without a weight, bold.
final
text → String
The text.
final

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.
override