ScalifyConfig constructor

const ScalifyConfig({
  1. double designWidth = 375.0,
  2. double designHeight = 812.0,
  3. double watchBreakpoint = 300.0,
  4. double mobileBreakpoint = 600.0,
  5. double tabletBreakpoint = 900.0,
  6. double smallDesktopBreakpoint = 1200.0,
  7. double desktopBreakpoint = 1800.0,
  8. bool respectTextScaleFactor = true,
  9. double minScale = 0.5,
  10. double maxScale = 4.0,
  11. double minFontSize = 6.0,
  12. double maxFontSize = 256.0,
  13. double memoryProtectionThreshold = 1920.0,
  14. double highResScaleFactor = 0.65,
  15. int debounceWindowMillis = 120,
  16. double rebuildScaleThreshold = 0.01,
  17. double rebuildWidthPxThreshold = 4.0,
  18. bool legacyContainerTierMapping = false,
  19. bool enableGranularNotifications = false,
  20. bool showDeprecationBanner = true,
  21. double minWidth = 0.0,
  22. 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);