LuckyCanvasCompatOptions class final
lucky-canvas 迁移选项;例如 const LuckyCanvasCompatOptions(remBase: 20)。
- Annotations
Constructors
-
LuckyCanvasCompatOptions({double remBase = kCompatRemBase, double? viewportWidth, double handleCssUnit(double value, String unit)?, LuckyTimebase timebase = LuckyTimebase.time, LuckyStopSolver stopSolver = const MonotonicStopSolver(), bool honorSpeedFunction = false, bool honorDisabled = false, ImageProvider<
Object> assetResolver(String src)?}) -
创建迁移选项;默认使用有效时间与单调停止求解。
const
- LuckyCanvasCompatOptions.strictUpstream({double remBase = kCompatRemBase, double? viewportWidth, double handleCssUnit(double value, String unit)?})
-
创建逐帧上游预设;
remBase默认 16,handleCssUnit处理未知单位。factory
Properties
-
assetResolver
→ ImageProvider<
Object> Function(String src)? -
资源路径解析器;未设置时使用 AssetImage。
final
- handleCssUnit → double Function(double value, String unit)?
-
未知单位回调,返回逻辑像素。
final
- hashCode → int
-
与选项相等性一致的哈希。
no setteroverride
- honorDisabled → bool
-
是否尊重奖品禁用标记。
final
- honorSpeedFunction → bool
-
是否采用上游声明但默认未使用的速度函数。
final
- remBase → double
-
rem 的根字号基准。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stopSolver → LuckyStopSolver
-
停止求解策略。
final
- timebase → LuckyTimebase
-
动画时间基准。
final
- viewportWidth → double?
-
vw 的视口宽度;缺失时解析器警告并保留数字。
final
Methods
-
copyWith(
{double? remBase, double? viewportWidth, double handleCssUnit(double value, String unit)?, LuckyTimebase? timebase, LuckyStopSolver? stopSolver, bool? honorSpeedFunction, bool? honorDisabled, ImageProvider< Object> assetResolver(String src)?}) → LuckyCanvasCompatOptions - 返回替换非 null 参数的副本;例如 options.copyWith(remBase: 24)。
-
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 -
按全部迁移选项比较。
override