MagnifierConfiguration class

放大镜配置类 包含放大镜功能的所有相关配置参数

Constructors

MagnifierConfiguration({bool enabled = true, double radius = 60.0, double magnification = 1.0, Color borderColor = Colors.white, double borderWidth = 3.0, Color crosshairColor = Colors.white, double crosshairRadius = 0.3, MagnifierPositionMode positionMode = MagnifierPositionMode.edge, MagnifierCornerPosition cornerPosition = MagnifierCornerPosition.topLeft, Offset edgeOffset = const Offset(20.0, 0.0), MagnifierShape shape = MagnifierShape.circle})
创建放大镜配置
const
MagnifierConfiguration.disabled()
创建禁用放大镜的配置
const

Properties

borderColor Color
放大镜边框颜色
final
borderWidth double
放大镜边框宽度
final
cornerPosition MagnifierCornerPosition
放大镜角落位置(仅在corner模式下生效)
final
crosshairColor Color
放大镜十字线颜色
final
crosshairRadius double
放大镜十字线半径比例(相对于放大镜半径)
final
edgeOffset Offset
放大镜边缘模式下的偏移距离
final
enabled bool
是否启用放大镜
final
hashCode int
The hash code for this object.
no setterinherited
magnification double
放大倍数
final
positionMode MagnifierPositionMode
放大镜位置模式
final
radius double
放大镜半径
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape MagnifierShape
放大镜形状
final

Methods

copyWith({bool? enabled, double? radius, double? magnification, Color? borderColor, double? borderWidth, Color? crosshairColor, double? crosshairRadius, MagnifierPositionMode? positionMode, MagnifierCornerPosition? cornerPosition, Offset? edgeOffset, MagnifierShape? shape}) MagnifierConfiguration
复制并修改配置
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