FoldInfo class
Where the fold is and how the device is held, for the current window.
- Annotations
Constructors
- FoldInfo({required Size windowSize, Rect? rect, FoldAxis? axis, FoldPosture posture = FoldPosture.none})
-
Creates fold information; most code uses FoldInfo.of.
const
-
FoldInfo.fromFeatures(Size size, List<
DisplayFeature> features) -
Fold information from a window
sizeand its displayfeatures.factory
Properties
- axis → FoldAxis?
-
Direction of the fold,
nullwithout one.final - hasFold → bool
-
Whether a fold or hinge is in view.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- isHalfOpen → bool
-
Whether the device is partly open (book or tabletop).
no setter
- posture → FoldPosture
-
How the device is folded.
final
- rect → Rect?
-
The fold or hinge in logical pixels of the window,
nullwithout one.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- windowSize → Size
-
Size of the window.
final
- windowSizeClass → WindowSizeClass
-
Window size class by width.
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.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
of(
BuildContext context) → FoldInfo -
Fold information for the window
contextis in. Rebuilds the caller when the window size or the fold changes.