copyWith method
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,
- bool? legacyContainerTierMapping,
- bool? enableGranularNotifications,
- bool? showDeprecationBanner,
- double? minWidth,
- bool? autoSwapDimensions,
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,
bool? legacyContainerTierMapping,
bool? enableGranularNotifications,
bool? showDeprecationBanner,
double? minWidth,
bool? autoSwapDimensions,
}) {
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,
legacyContainerTierMapping:
legacyContainerTierMapping ?? this.legacyContainerTierMapping,
enableGranularNotifications:
enableGranularNotifications ?? this.enableGranularNotifications,
showDeprecationBanner:
showDeprecationBanner ?? this.showDeprecationBanner,
minWidth: minWidth ?? this.minWidth,
autoSwapDimensions: autoSwapDimensions ?? this.autoSwapDimensions,
);
}