mk_sizer 1.1.0
mk_sizer: ^1.1.0 copied to clipboard
Adaptive Size helper created using concept of responsive_sizer and flutter_screen_util package.
1.1.0 #
- Added
MKSizer.respectAspectRatio(defaultfalse): blends the width/height scales toward their mean as the device's aspect ratio diverges fromdesignSize's, so layouts stretch less on very differently shaped screens (e.g. tablets vs. a phone mockup). No-op when the aspect ratios match. - Added
MKSizer.minScaleFactor/maxScaleFactorto clamp the.w/.h/.rscales (only whenrespectAspectRatiois true). - Added
MKSizer.minTextScaleFactor/maxTextScaleFactorto clamp the.spscale independently of layout scales (applies regardless ofrespectAspectRatio).context.spuses the same clamped scale. - Added
MKResponsiveBuilder,MKDeviceType,context.deviceTypeandcontext.resValue(...)for per-device-tier widgets/values (breakpoints 360 / 600 / 1024 by default). MKHelper.changed/MKHelper.initaccept the new options;MKSizerModelnotifies dependents correctly when they change.- Added tests.
1.0.2 #
- Added
MKSizedBox, aconst-capableSizedBoxthat scales width with.wand height with.h. - Added
MKPadding, aconst-capablePaddingthat scales horizontal insets with.wand vertical insets with.h, and updates on size change.
1.0.1 #
- Added
10.gap: a responsive, axis-aware gap widget (MKGap) that scales with.winside aRowand.hinside aColumn, matching the main-axis detection used bypackage:gapbut without depending on it.
1.0.0 #
- Renamed the package to
mk_sizer(importpackage:mk_sizer/mk_sizer.dart). - Responsive sizing extensions:
.w,.h,.r,.sp,.pw,.ph, spacing widgets andEdgeInsetshelpers. - Added
MKEdgeInsetsandMKEdgeInsetsDirectional; the directional variant scales horizontal values with.wand vertical with.h. MKSizer.builderis now aWidgetBuilder.- Extensions no longer throw before
MKSizerhas built; they scale 1:1. - Added
MKSizerModel(anInheritedModel) andcontext.w/h/r/sp/pw/ph, which rebuild a widget only when the axis it uses changes and work insideconstsubtrees. MKSizer.rebuildOnChange(defaulttrue) rebuilds the subtree on size change so10.wis correct insideconstwidgets.- Added tests.