ScannerAction class final

A button of a BarcodeResultSheet.

Annotations

Constructors

ScannerAction({required String? label, required VoidCallback? onPressed, ScannerIconData? icon, bool primary = false})
Creates an action.
const
ScannerAction.copy(String text, {bool primary = false, String? label})
Copies text to the clipboard; the button confirms with "Copied". label replaces ScannerLocalizations.copy, such as "Copy IBAN"; an empty string shows the icon alone. Its icons are the theme's icons.copy and icons.copied.
const
ScannerAction.scanAgain(VoidCallback onPressed, {bool primary = false, String? label})
Scans the next code: onPressed is ScannerResult.scanAgain. label replaces ScannerLocalizations.scanAgain.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
icon → ScannerIconData?
An icon before the text.
final
label → String?
The text; an empty string shows the icon alone. null for ScannerAction.copy and ScannerAction.scanAgain says ScannerLocalizations.copy or ScannerLocalizations.scanAgain.
final
onPressed → VoidCallback?
Called on tap.
final
primary → bool
Filled with the accent. A sheet has at most one: ScannerActions fills the first primary action and draws the others plain, so your primary button can go before ScannerResult.defaultActions as they are.
final
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