SizeExtension extension
App-provided extensions that wrap flutter_screenutil so you can use
ergonomic helpers like .w, .h, .sp, spacing widgets, and adapters
for EdgeInsets, BorderRadius, Radius, and BoxConstraints.
We import flutter_screenutil as su and hide its own extension symbols
to avoid name clashes with the extensions defined here. Scaling only applies
when ResponsiveUtils.isNeedScreenUtil is true for the active breakpoint.
Extension methods on num providing ScreenUtil-powered scaling and spacing
helpers. These return scaled values only when
ResponsiveUtils.isNeedScreenUtil is true; otherwise they return the raw
numeric value for predictable behavior across breakpoints.
Examples:
16.w,24.h,14.sp8.w.horizontalSpace,12.h.verticalSpace
- on
Properties
- dg → double
-
Available on num, provided by the SizeExtension extension
ScreenUtil.diagonalno setter - dm → double
-
Available on num, provided by the SizeExtension extension
ScreenUtil.diameterno setter - h → double
-
Available on num, provided by the SizeExtension extension
ScreenUtil.setHeightno setter - horizontalSpace → SizedBox
-
Available on num, provided by the SizeExtension extension
ScreenUtil.setWidthno setter - horizontalSpaceDiagonal → SizedBox
-
Available on num, provided by the SizeExtension extension
ScreenUtil.diagonalno setter - horizontalSpaceDiameter → SizedBox
-
Available on num, provided by the SizeExtension extension
ScreenUtil.diameterno setter - horizontalSpaceRadius → SizedBox
-
Available on num, provided by the SizeExtension extension
ScreenUtil.radiusno setter - r → double
-
Available on num, provided by the SizeExtension extension
ScreenUtil.radiusno setter - sh → double
-
Available on num, provided by the SizeExtension extension
屏幕高度的倍数 Multiple of screen heightno setter - sm → double
-
Available on num, provided by the SizeExtension extension
no setter - sp → double
-
Available on num, provided by the SizeExtension extension
ScreenUtil.setSpno setter - spMax → double
-
Available on num, provided by the SizeExtension extension
Largest of the raw value and its scaled font size counterpart. Useful to avoid text getting smaller than a specified minimum.no setter - spMin → double
-
Available on num, provided by the SizeExtension extension
smart size : it check your value - if it is bigger than your value it will set your value for example, you have set 16.sm() , if for your screen 16.sp() is bigger than 16 , then it will set 16 not 16.sp() I think that it is good for save size balance on big sizes of screenno setter - sw → double
-
Available on num, provided by the SizeExtension extension
屏幕宽度的倍数 Multiple of screen widthno setter - verticalSpace → SizedBox
-
Available on num, provided by the SizeExtension extension
ScreenUtil.setHeightno setter - verticalSpaceFromWidth → SizedBox
-
Available on num, provided by the SizeExtension extension
ScreenUtil.setVerticalSpacingFromWidthno setter - verticalSpacingDiagonal → SizedBox
-
Available on num, provided by the SizeExtension extension
ScreenUtil.diagonalno setter - verticalSpacingDiameter → SizedBox
-
Available on num, provided by the SizeExtension extension
ScreenUtil.diameterno setter - verticalSpacingRadius → SizedBox
-
Available on num, provided by the SizeExtension extension
ScreenUtil.radiusno setter - w → double
-
Available on num, provided by the SizeExtension extension
ScreenUtil.setWidthno setter