Viewport class

Constructors

Viewport({required num width, required num height, num? deviceScaleFactor, bool? isMobile, bool? isLandscape, bool? hasTouch})
Viewport.fromJson(Map<String, dynamic> json)
factory

Properties

deviceScaleFactor num?
Specify device scale factor. See https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio devicePixelRatio for more info.
final
hashCode int
The hash code for this object.
no setterinherited
hasTouch bool?
Specify if the viewport supports touch events.
final
height num
The page height in CSS pixels.
final
isLandscape bool?
Specifies if the viewport is in landscape mode.
final
isMobile bool?
Whether the meta viewport tag is taken into account.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width num
The page width in CSS pixels.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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