ScalifyConfig constructor
const
ScalifyConfig({
- double designWidth = 375.0,
- double designHeight = 812.0,
- double watchBreakpoint = 300.0,
- double mobileBreakpoint = 600.0,
- double tabletBreakpoint = 900.0,
- double smallDesktopBreakpoint = 1200.0,
- double desktopBreakpoint = 1800.0,
- bool respectTextScaleFactor = true,
- double minScale = 0.5,
- double maxScale = 4.0,
- double minFontSize = 6.0,
- double maxFontSize = 256.0,
- double memoryProtectionThreshold = 1920.0,
- double highResScaleFactor = 0.65,
- int debounceWindowMillis = 120,
- double rebuildScaleThreshold = 0.01,
- double rebuildWidthPxThreshold = 4.0,
- bool legacyContainerTierMapping = false,
- bool enableGranularNotifications = false,
- bool showDeprecationBanner = true,
- double minWidth = 0.0,
- bool autoSwapDimensions = false,
Creates a new ScalifyConfig.
Implementation
const ScalifyConfig({
this.designWidth = 375.0,
this.designHeight = 812.0,
this.watchBreakpoint = 300.0,
this.mobileBreakpoint = 600.0,
this.tabletBreakpoint = 900.0,
this.smallDesktopBreakpoint = 1200.0,
this.desktopBreakpoint = 1800.0,
this.respectTextScaleFactor = true,
this.minScale = 0.5,
this.maxScale = 4.0,
this.minFontSize = 6.0,
this.maxFontSize = 256.0,
this.memoryProtectionThreshold = 1920.0,
this.highResScaleFactor = 0.65,
this.debounceWindowMillis = 120,
this.rebuildScaleThreshold = 0.01,
this.rebuildWidthPxThreshold = 4.0,
this.legacyContainerTierMapping = false,
this.enableGranularNotifications = false,
this.showDeprecationBanner = true,
this.minWidth = 0.0,
this.autoSwapDimensions = false,
}) : assert(minScale <= maxScale,
'minScale must be less than or equal to maxScale'),
assert(
minFontSize <= maxFontSize, 'minFontSize must be <= maxFontSize'),
assert(designWidth > 0),
assert(designHeight > 0);