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
textto the clipboard; the button confirms with "Copied".labelreplaces ScannerLocalizations.copy, such as "Copy IBAN"; an empty string shows the icon alone. Its icons are the theme'sicons.copyandicons.copied.const - ScannerAction.scanAgain(VoidCallback onPressed, {bool primary = false, String? label})
-
Scans the next code:
onPressedisScannerResult.scanAgain.labelreplaces 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.
nullfor 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