super_responsive library
Classes
- Breakpoints
- An utility to keep all your break points in a class, it is mainly used by the SuperResponsive widget, that makes it available on the entire widget three
- Range
- A util class to write a range in a more readable way.
- ResponsiveGap
- A util class that can be used with ResponsiveLayout
- ResponsiveLayout
- A util class that builds a certain layout based on the current break point.
- ResponsiveText
- A util widget that calculates the font size of a text based on the given range fontSizeRange and the global breakpoints.
- ResponsiveWidget
- Returns a widget form children based on the current break point.
- SuperResponsive
- Widget used to make available our breakpoints in the entire widget three, it also exposes
Extensions
- ResponsiveBoxConstraints on BoxConstraints
- Extensions for BoxConstraints containing perWidth and perHeight
- ResponsiveContext on BuildContext
-
Extensions for BuildContext containing breakpoints, responsiveValue,
customResponsiveValue,
currentBreakPoint
- ResponsiveNum on double
- Extensions for Num containing min, max, and per
- ResponsiveWidgetExtension on Widget
- A util extension to wrap a Widget in an Expanded widget or a Flexible, for more readability when making complex layouts with ResponsiveLayout.
Functions
-
inverseLerp(
double value, double min, double max) → double -
Maps a value between 0.0 - 1.0 to the range
min
-max
-
lerp(
double value, double min, double max) → double -
Maps a value between its range
min
-max
and 0.0 - 1.0 -
mapValue(
double value, double minIn, double maxIn, double minOut, double maxOut) → double -
Re-maps a value from one range into another. That is, a
value
between the rangeminIn
-maxIn
will be mapped to the rangeminOut
-maxOut
, thevalue
will be clamped in case is not inside its rangeminIn
-maxIn
Typedefs
-
BreakpointsBuilder
= List<
double> Function(Breakpoints breakpoints) -
A callback used in ResponsiveLayout, it exposes the
breakpoints
of the closest SuperResponsive widget in the widget tree. - Condition = bool Function(double value)
- Helper typedef for ResponsiveNum extensions.
-
CustomValueBuilder
= Map<
String, double> Function(BuildContext context) - Typedef utils used in SuperResponsive's customValues
-
LayoutsBuilder
= List<
Widget> Function(Widget child(int i)) - A callback used in ResponsiveLayout, it exposes a function called "child", that accepts as an input and integer and return the child of that index from ResponsiveLayout.children.
- ResponsiveLayoutBuilder = Widget Function(BuildContext context, Widget child)
- A callback used in ResponsiveLayout, can be used in case you want to wrap all your layouts in a common widget