copyWith method

ScalifyConfig copyWith({
  1. double? designWidth,
  2. double? designHeight,
  3. double? watchBreakpoint,
  4. double? mobileBreakpoint,
  5. double? tabletBreakpoint,
  6. double? smallDesktopBreakpoint,
  7. double? desktopBreakpoint,
  8. bool? respectTextScaleFactor,
  9. double? minScale,
  10. double? maxScale,
  11. double? minFontSize,
  12. double? maxFontSize,
  13. double? memoryProtectionThreshold,
  14. double? highResScaleFactor,
  15. int? debounceWindowMillis,
  16. double? rebuildScaleThreshold,
  17. double? rebuildWidthPxThreshold,
})

Creates a copy of this config with the given fields replaced with the new values.

Implementation

ScalifyConfig copyWith({
  double? designWidth,
  double? designHeight,
  double? watchBreakpoint,
  double? mobileBreakpoint,
  double? tabletBreakpoint,
  double? smallDesktopBreakpoint,
  double? desktopBreakpoint,
  bool? respectTextScaleFactor,
  double? minScale,
  double? maxScale,
  double? minFontSize,
  double? maxFontSize,
  double? memoryProtectionThreshold,
  double? highResScaleFactor,
  int? debounceWindowMillis,
  double? rebuildScaleThreshold,
  double? rebuildWidthPxThreshold,
}) {
  return ScalifyConfig(
    designWidth: designWidth ?? this.designWidth,
    designHeight: designHeight ?? this.designHeight,
    watchBreakpoint: watchBreakpoint ?? this.watchBreakpoint,
    mobileBreakpoint: mobileBreakpoint ?? this.mobileBreakpoint,
    tabletBreakpoint: tabletBreakpoint ?? this.tabletBreakpoint,
    smallDesktopBreakpoint:
        smallDesktopBreakpoint ?? this.smallDesktopBreakpoint,
    desktopBreakpoint: desktopBreakpoint ?? this.desktopBreakpoint,
    respectTextScaleFactor:
        respectTextScaleFactor ?? this.respectTextScaleFactor,
    minScale: minScale ?? this.minScale,
    maxScale: maxScale ?? this.maxScale,
    minFontSize: minFontSize ?? this.minFontSize,
    maxFontSize: maxFontSize ?? this.maxFontSize,
    memoryProtectionThreshold:
        memoryProtectionThreshold ?? this.memoryProtectionThreshold,
    highResScaleFactor: highResScaleFactor ?? this.highResScaleFactor,
    debounceWindowMillis: debounceWindowMillis ?? this.debounceWindowMillis,
    rebuildScaleThreshold:
        rebuildScaleThreshold ?? this.rebuildScaleThreshold,
    rebuildWidthPxThreshold:
        rebuildWidthPxThreshold ?? this.rebuildWidthPxThreshold,
  );
}