ResponsiveHelper class

Helper class containing utility methods for responsive logic.

Constructors

ResponsiveHelper.fromContext(BuildContext context)
Creates a ResponsiveHelper from the current context.
factory
ResponsiveHelper.fromData(ResponsiveData data)
Creates a ResponsiveHelper with the given data.

Properties

data → ResponsiveData
The current responsive data.
final
hashCode → int
The hash code for this object.
no setterinherited
isLargeScreen → bool
Returns true if the device is a desktop or large desktop.
no setter
isMediumScreen → bool
Returns true if the device is a tablet or small desktop.
no setter
isSmallScreen → bool
Returns true if the device is a watch or mobile.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
screenType → ScreenType
Returns the current screen type (mobile, tablet, desktop, etc.).
no setter
textScaleFactor → double
Returns the system text scale factor.
no setter

Methods

autoScaleInt(int value) → int
Returns a scaled integer value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
scale(double value) → double
Scales a value by the general scale factor.
scaleHeight(double value) → double
Scales a value by the height scale factor.
scaleWidth(double value) → double
Scales a value by the width scale factor.
toString() → String
A string representation of this object.
inherited
valueByScreen<T>({required T mobile, T? watch, T? tablet, T? smallDesktop, T? desktop, T? largeDesktop}) → T
Returns a value based on the current screen type.

Operators

operator ==(Object other) → bool
The equality operator.
inherited