ZoomButtons class
Glass zoom presets; hidden when there are fewer than two. On an iPhone with several cameras on the back they are its cameras: "0.5×" (the ultra-wide camera, ScannerState.minZoom), "1×" and the telephoto camera (ScannerState.telephotoZoom, "4×" on an iPhone 17 Pro). Elsewhere "1×", "2×" and "4×", as far as the camera zooms, after ScannerState.minZoom when it is below 1 (an Android camera that zooms out). A preset selected after pinching shows the actual zoom ("1.6×").
Where the camera can zoom by itself (ScannerState.autoZoom), an "Auto" button comes first. While it is selected, the scanner picks the zoom, and the preset it picked is lit faintly; a tap on a preset zooms by hand.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ZoomButtons
Constructors
-
ZoomButtons(ScannerController controller, {Key? key, List<
double> ? levels, Axis direction = Axis.horizontal}) -
Creates the buttons.
const
Properties
- controller → ScannerController
-
The controller to zoom.
final
- direction → Axis
-
A row, or a column (beside the window in landscape).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
levels
→ List<
double> ? -
Zoom factors to offer instead, in ascending order; those above
ScannerState.maxZoom are left out. ScannerState.minZoom is added in
front when it is below 1.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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