Code class

Flutter widget to draw a CodeType on screen.

Inheritance

Constructors

Code({Key? key, required String data, required CodeType codeType, Color color = Colors.black, Color? backgroundColor, Decoration? decoration, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, double? width, double? height, bool drawText = true, TextStyle? style, double textPadding = 5, BarcodeErrorBuilder? errorBuilder})
Draw a barcode on screen
const
Code.fromBytes({Key? key, required Uint8List data, required CodeType codeType, Color color = Colors.black, Color? backgroundColor, Decoration? decoration, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, double? width, double? height, bool drawText = true, TextStyle? style, double textPadding = 5, BarcodeErrorBuilder? errorBuilder})
Draw a barcode on screen using Uint8List data
const

Properties

backgroundColor Color?
The background color. this should be white or really light color
final
codeType CodeType
The type of code to use. use:
final
color Color
The bars color should be black or really dark color
final
data Uint8List
no setter
decoration Decoration?
Decoration to apply to the barcode
final
drawText bool
Whether to draw the text with the barcode
final
errorBuilder BarcodeErrorBuilder?
Displays a custom widget in case of error with the barcode.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
Height of the barcode with padding
final
isBytes bool
Is this raw bytes
no setter
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin EdgeInsetsGeometry?
Margin to apply
final
padding EdgeInsetsGeometry?
Padding to apply
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style TextStyle?
Text style to use to draw the text
final
textPadding double
Padding to add between the text and the barcode
final
width double?
Width of the barcode with padding
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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