copyWith method

LuckyCanvasCompatOptions copyWith({
  1. double? remBase,
  2. double? viewportWidth,
  3. double handleCssUnit(
    1. double value,
    2. String unit
    )?,
  4. LuckyTimebase? timebase,
  5. LuckyStopSolver? stopSolver,
  6. bool? honorSpeedFunction,
  7. bool? honorDisabled,
  8. ImageProvider<Object> assetResolver(
    1. String src
    )?,
})

返回替换非 null 参数的副本;例如 options.copyWith(remBase: 24)。

Implementation

LuckyCanvasCompatOptions copyWith({
  double? remBase,
  double? viewportWidth,
  double Function(double value, String unit)? handleCssUnit,
  LuckyTimebase? timebase,
  LuckyStopSolver? stopSolver,
  bool? honorSpeedFunction,
  bool? honorDisabled,
  ImageProvider<Object> Function(String src)? assetResolver,
}) =>
    LuckyCanvasCompatOptions(
      remBase: remBase ?? this.remBase,
      viewportWidth: viewportWidth ?? this.viewportWidth,
      handleCssUnit: handleCssUnit ?? this.handleCssUnit,
      timebase: timebase ?? this.timebase,
      stopSolver: stopSolver ?? this.stopSolver,
      honorSpeedFunction: honorSpeedFunction ?? this.honorSpeedFunction,
      honorDisabled: honorDisabled ?? this.honorDisabled,
      assetResolver: assetResolver ?? this.assetResolver,
    );