FloatingParams class
Constructors
- FloatingParams({bool enablePositionCache = true, bool isSnapToEdge = true, bool isDragEnable = true, bool isShowLog = false, double dragOpacity = 0.3, double marginTop = 0, double marginBottom = 0, double snapToEdgeSpace = 0, int snapToEdgeSpeed = 250, SnapEdgeType snapEdgeType = SnapEdgeType.snapEdgeAuto, int notifyThrottleMs = 16})
-
const
Properties
- dragOpacity → double
-
拖动时的透明度,默认为 0.3
请注意,移动默认是有透明动画的,如需要关闭透明度动画,请修改 dragOpacity为 1
final
- enablePositionCache → bool
-
是否在调用
Floating.open时,保持上一次Floating.close前的位置final - hashCode → int
-
The hash code for this object.
no setterinherited
- isDragEnable → bool
-
是否允许拖动悬浮窗,默认为 true
final
- isShowLog → bool
-
是否打印日志,默认为 false
final
- isSnapToEdge → bool
-
是否自动吸附左右边缘,默认为 true
final
- marginBottom → double
-
拖动范围限制,与底部的最小距离(可设为负数)
final
- marginTop → double
-
拖动范围限制,与顶部的最小距离(可设为负数)
final
- notifyThrottleMs → int
-
移动通知节流间隔(毫秒),默认 16ms(约 60fps)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- snapEdgeType → SnapEdgeType
-
拖动后吸附在哪一侧
final
- snapToEdgeSpace → double
-
吸附后回弹至与边缘的距离,正值限制在内、负值允许超出。
final
- snapToEdgeSpeed → int
-
吸附边缘的速度,默认 250,越大越快
final
Methods
-
copyWith(
{bool? enablePositionCache, bool? isSnapToEdge, bool? isDragEnable, bool? isShowLog, double? dragOpacity, double? marginTop, double? marginBottom, double? snapToEdgeSpace, int? snapToEdgeSpeed, SnapEdgeType? snapEdgeType, int? notifyThrottleMs}) → FloatingParams -
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