DisplayFeature class

Area of the display that may be obstructed by a hardware feature.

This is populated only on Android.

The bounds are measured in logical pixels. On devices with two screens the coordinate system starts with (0,0) in the top-left corner of the left or top screen and expands to include both screens and the visual space between them.

The type describes the behaviour and if DisplayFeature obstructs the display. For example, DisplayFeatureType.hinge and DisplayFeatureType.cutout both obstruct the display, while DisplayFeatureType.fold does not.

Device with a hinge display feature

Device with a fold display feature

Device with a cutout display feature

The state contains information about the posture for foldable features (DisplayFeatureType.hinge and DisplayFeatureType.fold). The posture is the shape of the display, for example DisplayFeatureState.postureFlat or DisplayFeatureState.postureHalfOpened. For DisplayFeatureType.cutout, the state is not used and has the DisplayFeatureState.unknown value.


DisplayFeature({required Rect bounds, required DisplayFeatureType type, required DisplayFeatureState state})


bounds Rect
The area of the flutter view occupied by this display feature, measured in logical pixels.
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state DisplayFeatureState
Posture of display feature, which is populated only for folds and hinges.
type DisplayFeatureType
Type of display feature, e.g. hinge, fold, cutout.


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


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