ViewportData class
Data class representing a viewport configuration.
Constructors
- ViewportData({required String name, required double width, required double height, required double pixelRatio, required TargetPlatform platform, EdgeInsets safeAreas = EdgeInsets.zero})
-
Creates a ViewportData instance.
const
- ViewportData.constrained({required String name, double minWidth = 0, double maxWidth = double.infinity, double minHeight = 0, double maxHeight = double.infinity, required double pixelRatio, required TargetPlatform platform, EdgeInsets safeAreas = EdgeInsets.zero})
-
const
Properties
- boxConstraints → BoxConstraints
-
Used with ConstrainedBox to set the constraints of the viewport.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxHeight → double
-
The maximum height of the viewport.
final
- maxSize → Size
-
no setter
- maxWidth → double
-
The maximum width of the viewport.
final
- minHeight → double
-
The minimum height of the viewport.
final
- minSize → Size
-
no setter
- minWidth → double
-
The minimum width of the viewport.
final
- name → String
-
The name of the viewport.
final
- pixelRatio → double
-
The pixel ratio of the viewport.
final
- platform → TargetPlatform
-
The target platform for the viewport.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- safeAreas → EdgeInsets
-
The safe areas for the viewport.
final
- viewConstraints → ViewConstraints
-
Used with TestFlutterView.physicalConstraints It needs to be scaled up
by the pixel ratio to get the correct physical size.
no setter
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