ResponsiveScreen class

Provides information about the current screen.

This class determines the screen type based on the device width and the configured breakpoints.

Constructors

ResponsiveScreen(ResponsiveScreenSettings settings)
Creates a new ResponsiveScreen with the given settings.

Properties

context BuildContext
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
height double
The height of the screen.
no setter
isDesktop bool
Whether the screen type is ScreenType.desktop.
no setter
isPhone bool
Whether the screen type is ScreenType.phone.
no setter
isTablet bool
Whether the screen type is ScreenType.tablet.
no setter
isWatch bool
Whether the screen type is ScreenType.watch.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screenType ScreenType
The current screen type based on the device width.
no setter
settings ResponsiveScreenSettings
final
width double
The width of the screen.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
responsiveValue<T>({T? mobile, T? tablet, T? desktop, T? watch}) → T?
Returns a value based on the current screen type.
toString() String
A string representation of this object.
inherited

Operators

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