media_break_points library
Constants
- desktopBreakPointEnd → const double
- desktopBreakPointStart → const double
- screen size lg
- extraSmallEnd → const double
- extraSmallStart → const double
- screen size xs
- mobileBreakPointEnd → const double
- mobileBreakPointStart → const double
- screen size sm
- tabletBreakPointEnd → const double
- tabletBreakPointStart → const double
- screen size md
- wideScreenBreakPointStart → const double
- screen size xl
Functions
-
isLg(
BuildContext context) → bool - if screen is lg
-
isMd(
BuildContext context) → bool - if screen is md
-
isSm(
BuildContext context) → bool - if screen is sm
-
isXl(
BuildContext context) → bool - if screen is xl
-
isXs(
BuildContext context) → bool - if screen is xs
-
strRep<
T> (BuildContext context) → String - return string representation of screen size
-
valBetween(
double val, double start, double end) → bool -
check if values are between
start
andend
-
valueFor<
T> (BuildContext context, {T? xs, T? sm, T? md, T? lg, T? xl, T? defaultValue}) → T? -
Returns value corresponding to current breakpoint
if corresponding breakpoint is not provided or
defaultValue
if a default value is provided provided optional breakpoints includexs
- between extraSmallStart and [extraSmallEndsm
- between mobileBreakPointStart and mobileBreakPointEndmd
- between tabletBreakPointStart and tabletBreakPointEndlg
- between desktopBreakPointStart and desktopBreakPointEndxl
- viewports above wideScreenBreakPointStartdefaultValue
the default value to return if a breakpoint value isn't set