ScalifyConfig class

Configuration class for ScalifyProvider. Defines the design baseline, breakpoints, and scaling behavior.

Constructors

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.005, double rebuildWidthPxThreshold = 3.0})
Creates a new ScalifyConfig.
const

Properties

debounceWindowMillis → int
Time in milliseconds to debounce resize events (Desktop/Web).
final
designHeight → double
Base design height (e.g., 812 for iPhone design).
final
designWidth → double
Base design width (e.g., 375 for iPhone design).
final
desktopBreakpoint → double
Breakpoint for Desktops (1200 - 1800).
final
hashCode → int
The hash code for this object.
no setterinherited
highResScaleFactor → double
The dampening factor applied to width pixels exceeding memoryProtectionThreshold.
final
maxFontSize → double
Maximum allowed font size (prevents text from exploding on large screens).
final
maxScale → double
Maximum allowed scale factor (prevents UI from exploding on huge screens).
final
memoryProtectionThreshold → double
The width threshold where 4K/Ultra-wide protection kicks in (default 1920).
final
minFontSize → double
Minimum allowed font size (prevents text from becoming unreadable).
final
minScale → double
Minimum allowed scale factor (prevents UI from becoming too small).
final
mobileBreakpoint → double
Breakpoint for Mobile devices (300 - 600).
final
rebuildScaleThreshold → double
The scale difference required to trigger a rebuild.
final
rebuildWidthPxThreshold → double
The pixel width difference required to trigger a rebuild.
final
respectTextScaleFactor → bool
Whether to respect the system's text scale factor (Accessibility).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
smallDesktopBreakpoint → double
Breakpoint for Small Desktops (900 - 1200).
final
tabletBreakpoint → double
Breakpoint for Tablets (600 - 900).
final
watchBreakpoint → double
Breakpoint for Watch devices (default < 300).
final

Methods

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}) → ScalifyConfig
Creates a copy of this config with the given fields replaced with the new values.
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
The equality operator.
inherited