ScreenSizeUtils class

Utility class to determine screen size based on width

Constructors

ScreenSizeUtils()

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

getOrientation(BuildContext context) Orientation
Returns the orientation of the device
getScreenSizeType(BuildContext context) ScreenSizeType
Returns the current screen size type based on width
getScreenSizeTypeFromWidth(double width) ScreenSizeType
Returns the screen size type based on a given width
isDesktop(BuildContext context) bool
Returns true if the screen is considered desktop
isLandscape(BuildContext context) bool
Returns true if the device is in landscape orientation
isMobile(BuildContext context) bool
Returns true if the screen is considered mobile
isMobileOrTablet(BuildContext context) bool
Returns true if the screen is considered mobile or tablet
isPortrait(BuildContext context) bool
Returns true if the device is in portrait orientation
isTablet(BuildContext context) bool
Returns true if the screen is considered tablet

Constants

desktopBreakpoint → const double
largeDesktopBreakpoint → const double
mobileBreakpoint → const double
Default breakpoints for different screen sizes
tabletBreakpoint → const double