BarcodeResultSheet class

The result sheet of a scanned code: its kind ("LINK"), a title, details, the raw text, the symbology and buttons.

BarcodeResultSheet(
  barcode,
  actions: [
    ScannerAction(label: 'Open', icon: ScannerIcons.open, primary: true, onPressed: open),
    ScannerAction.copy(barcode.text),
  ],
)

Without actions it shows a copy button and, with onScanAgain, "Scan again". With actions that do not scan again, onScanAgain puts a close button in the corner, so the scanner is never a tap away from the next code.

Inheritance

Constructors

BarcodeResultSheet(Barcode barcode, {Key? key, List<ScannerAction>? actions, VoidCallback? onScanAgain, VoidCallback? onClose, bool showIcon = false, bool showPicture = true, Image? cutOut, bool asCard = false})
Creates a sheet for barcode.
const

Properties

actions → List<ScannerAction>?
The buttons; null for copy and "Scan again".
final
asCard → bool
Shows the text as the number of a card, such as a loyalty card: large, in groups of four, under a card badge (ScannerTemplate.loyalty).
final
barcode → Barcode
The code.
final
cutOut → Image?
The camera's cut-out of the code, for the picture of codes that cannot be drawn exactly. Not disposed by the sheet.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onClose → VoidCallback?
Puts a close button in the corner that hides the sheet without scanning again, such as back to the other codes of ScannerTemplate.pick.
final
onScanAgain → VoidCallback?
Hides the sheet and scans again, for the default buttons.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showIcon → bool
Shows an icon of the content's kind next to the title.
final
showPicture → bool
Shows the picture of the code next to the title (BarcodeThumbnail), unless showIcon.
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, int wrapWidth = 65}) → 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

Static Methods

iconOf(BarcodeContent content) → ScannerIconData
The icon of content's kind.
serviceIconOf(LinkService service) → ScannerIconData
A neutral sign of service's kind: a chat bubble for messengers, a profile for social networks and so on. Never a brand's logo.