ScreenUtils class

Constructors

ScreenUtils()

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 Properties

windowSize Size
no setter

Static Methods

clearPreferredOrientation() Future<void>
To use this function make sure to call WidgetsFlutterBinding.ensureInitialized(); in your main() function
getMeasure([Size? size]) DeviceScreenMeasure
getType([Size? size]) DeviceScreenType
isDesktop([Size? size]) bool
isLandscape([BuildContext? context]) bool
isMobile([Size? size]) bool
isMobileScreen([Size? size]) bool
isPortrait([BuildContext? context]) bool
isTablet([Size? size]) bool
isTabletScreen([Size? size]) bool
isTV([Size? size]) bool
isWatch([Size? size]) bool
setPreferredOrientation(DeviceOrientation orientation) Future<void>
To use this function make sure to call WidgetsFlutterBinding.ensureInitialized(); in your main() function
setPreferredOrientationLandscape() Future<void>
To use this function make sure to call WidgetsFlutterBinding.ensureInitialized(); in your main() function
setPreferredOrientationPortrait() Future<void>
To use this function make sure to call WidgetsFlutterBinding.ensureInitialized(); in your main() function
setPreferredOrientations(List<DeviceOrientation> orientations) Future<void>
To use this function make sure to call WidgetsFlutterBinding.ensureInitialized(); in your main() function