ResponsiveContext extension

Extensions for BuildContext containing breakpoints, responsiveValue, customResponsiveValue, currentBreakPoint

on

Properties

breakpoints Breakpoints
Returns break points from the closest SuperResponsive widget in the widget tree
no setter
currentBreakpoint double
Returns the current break point. see SuperResponsive for more info
no setter
customValues Map<String, double>
Returns custom values from the closes SuperResponsive widget in the widget tree
no setter
mediaQueryHeight double
Returns MediaQuery.of(context).size.height.
no setter
mediaQueryWidth double
Returns MediaQuery.of(context).size.width.
no setter

Methods

customResponsiveValue({required Range breakpointsRange(Breakpoints breakpoints), required Range valueRange}) double
Maps the size of the screen from the range breakpointsRange to the given range valueRange.min - valueRange.max.
responsiveInverseValue(double min, double max) double
Maps the size of the screen from the range breakpoints.extremes to the given range min - max and inverses it. See SuperResponsive for more info.
responsiveValue(double min, double max) double
Maps the size of the screen from the range breakpoints.extremes to the given range min - max. See SuperResponsive for more info.
whenBreakpoints<T extends Object?>({required T first(double breakpoint), required T second(double breakpoint), T third(double breakpoint)?, T fourth(double breakpoint)?, T fifth(double breakpoint)?, T sixth(double breakpoint)?}) → T
Returns Breakpoints.when with a maxWidth equal to the current screen width