device_lab library

Device preview for Flutter: an up-to-date device catalog, real display features for foldables and cutouts, free-form resolutions and a runtime preview toggle.

Classes

DeviceButton
A physical button drawn on the side of a device frame.
DeviceCatalog
The registry of devices available to the preview and to golden tests.
DeviceFrame
The bezel drawn around a device's screen in the preview.
DeviceLab
Wraps your app in a device preview.
DeviceLabController
Holds every piece of preview state and notifies when any of it changes.
DeviceLabScope
Exposes the DeviceLabController to the subtree, including across the boundary into your own MaterialApp.
DeviceLabStorage
Persists the preview selection so it outlives the widget that made it.
DeviceScreen
One physical display of a device.
DeviceSpec
A device in the catalog.
DeviceSpecCodec
Converts DeviceSpec to and from the JSON shape DeviceCatalog accepts.
DisplayFeature
Area of the display that may be obstructed by a hardware feature.
FrameSpine
The hinge spine of a closed foldable, seen edge-on along one side.
HingeSpec
The fold or hinge of a foldable device.
ScreenCutout
A camera intrusion such as a notch, Dynamic Island or punch hole.
SessionDeviceLabStorage
A DeviceLabStorage that remembers the selection for the lifetime of the process.

Enums

CutoutShape
The shape of a camera intrusion drawn over the screen.
DeviceCategory
Broad form factor, used to group devices in the picker and in queries.
DevicePlatform
The operating system a device runs, used to pick its TargetPlatform.
DisplayFeatureState
State of the display feature, which contains information about the posture for foldable features.
DisplayFeatureType
Type of DisplayFeature, describing the DisplayFeature behaviour and if it obstructs the display.
FoldPosture
How far a foldable is opened.

Extensions

FoldQuery on MediaQueryData
Foldable-aware reads over MediaQueryData.displayFeatures.
FoldQueryContext on BuildContext
Shorthand for the most common FoldQuery reads.