ScanWindowUtils class final

A utility class for calculating scan window sizes.

Constructors

ScanWindowUtils()

Properties

hashCode int
The hash code for this object.
no setterinherited
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

Static Methods

calculateBoxFitRatio({required BoxFit boxFit, required Size cameraPreviewSize, required Size size}) → ({double heightRatio, double widthRatio})
Calculate the scaling ratios for width and height to fit the provided cameraPreviewSize into the specified size, based on the specified boxFit.
calculateScanWindowRelativeToTextureInPercentage(BoxFit fit, Rect scanWindow, {required Size textureSize, required Size widgetSize}) Rect
Calculate the scan window rectangle relative to the texture size.