ScannerView class
基于原始扫描预览 使用简单
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ScannerView
Constructors
-
ScannerView.new({Key? key, CameraLensFacing? lensFacing, Color? flashOnColor, Color? flashOffColor, double topRatio = 0.3, double leftRatio = 0.1, double widthRatio = 0.8, double heightRatio = 0.4, bool bestFit = true, double? hornStrokeWidth, double? scannerStrokeWidth, bool scannerBox = true, ValueChanged<
String> ? scanResult, Widget? child, String? flashText, CameraResolution? resolution, Color? borderColor, Color? scannerColor}) -
const
Properties
- bestFit → bool
-
限制最佳宽高
final
- borderColor → Color?
-
final
- child → Widget?
-
预览顶层添加组件
final
- flashOffColor → Color
-
final
- flashOnColor → Color
-
final
- flashText → String?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- heightRatio → double
-
识别区域的宽高度比例
final
- hornStrokeWidth → double?
-
屏幕宽度比例=leftRatio + widthRatio + leftRatio
屏幕高度比例=topRatio + heightRatio + topRatio
中间线条宽度
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leftRatio → double
-
距离屏幕左边
final
- lensFacing → CameraLensFacing
-
相机位置
final
- resolution → CameraResolution?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scannerBox → bool
-
是否显示扫描框
final
- scannerColor → Color?
-
final
- scannerStrokeWidth → double?
-
边框宽度
final
-
scanResult
→ ValueChanged<
String> ? -
扫描结果回调
final
- topRatio → double
-
识别区域 比例 0-1
距离屏幕头部
final
- widthRatio → double
-
识别区域的宽高度比例
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _ScannerViewState -
Creates the mutable state for this widget at a given location in the tree.
override
-
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