ResponsiveHelper class
Adapts debug UI sizes to the screen size.
The API (getFontSize, getPadding, getSpacing, getResponsiveSize,
getUIElementSize) is unchanged — only the scale factors are more
conservative. Tablets used to scale everything 3x and text overflowed.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
clampTextScale(
BuildContext context, Widget child) → Widget - Protects the debug pages from a large system font size setting — otherwise text overflows its boxes.
-
constrain(
BuildContext context, Widget child) → Widget - Centers content on wide screens and limits it to a maximum width.
-
contentMaxWidth(
BuildContext context) → double - Prevents overly long lines on wide screens.
-
getFontSize(
BuildContext context, double baseSize) → double -
getPadding(
BuildContext context, double basePadding) → double -
getResponsiveSize(
BuildContext context, double baseSize) → double -
getSpacing(
BuildContext context, double baseSpacing) → double -
getUIElementSize(
BuildContext context, double baseSize) → double - Less aggressive scaling for UI elements such as icons and the AppBar.
-
gridColumns(
BuildContext context) → int - Number of columns for the statistics cards.
-
isLandscape(
BuildContext context) → bool -
isLargeScreen(
BuildContext context) → bool -
isTablet(
BuildContext context) → bool