Modules

August 22, 2026 · View on GitHub

The library ships as a principal artifact (appdimens_flutter = common + core + scaled) plus optional strategy satellites and an all-in-one meta-package — the same packaging philosophy as appdimens-kmp / appdimens-dynamic.

Package graph

                        ┌────────────────┐
                        │  appdimens_bom │  (meta: re-exports everything)
                        └───────┬────────┘

        ┌───────────────────────┼───────────────────────────┐
        ▼                       ▼                           ▼
 appdimens_percent   appdimens_power   …   appdimens_units
        │                       │                           │
        └───────────────┬───────┴─────────────┬─────────────┘
                        ▼                     ▼
                  ┌───────────────────────────────┐
                  │       appdimens_flutter       │  ← principal artifact
                  │  common · core · scaled       │
                  └───────────────────────────────┘

Artifacts

PackageContents
appdimens_fluttercommon enums (DpQualifier, Inverter, UiModeType, …), core engine (ScreenConfiguration, DimenMetrics, DimenCache, DimenScaledEngine, plumbing), scaled families + facilitators, AppDimensProvider/AppDimensApp, resize math primitives
appdimens_percentPercent curves + literal space family (spaceW/spaceH/spaceSw)
appdimens_powerSub-linear power curve (d/300)^0.75
appdimens_fluidClamped lerp between b×0.8 and b×1.2 over [320, 768]
appdimens_autoLinear phones / log-damped tablets (480 dp transition)
appdimens_diagonalScreen-diagonal ratio
appdimens_fillCSS cover ratio
appdimens_fitCSS contain ratio
appdimens_interpolatedFixed 50 % blend between raw and scaled
appdimens_logarithmicSymmetric ±0.4·ln damping
appdimens_perimeterHalf-perimeter ratio
appdimens_densityPhysical-density alignment (dpi/160)
appdimens_resizeConstraint auto-fit widgets (AutoResizeText, AutoResizeSquare) + range search
appdimens_unitsmm/cm/inch ↔ dp/px/sp conversions
appdimens_bomRe-exports all of the above at one version

Dependency rules

  1. Satellites depend only on appdimens_flutter (never on each other) — you can adopt exactly the strategies you need.
  2. The shared grammar lives in appdimens_flutter' internal strategy_resolution.dart; satellites contribute only their formula.
  3. Apps may depend on appdimens_bom for convenience or on individual satellites to keep the dependency tree minimal.

Generation

The satellite packages share their extension grammar via scripts/generate_satellites.py. The script is the single source of truth for stems, suffix sets, inverters, facilitators and sp twins; per-strategy formulas are configured in its STRATEGIES table together with their memoized default-path factors.

Sample & BenchLab

AppPathPurpose
Sampleapps/sampleStrategy-routing demo + benchmark dashboard (converted from the KMP/Dynamic sample app)
BenchLabapps/benchlabCompetitor benchmark: UI probe, isolate probe, legacy passes, resolution parity, report export