device_lab_testing library
Golden-test helpers that reuse the same device specs as the preview.
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.
- DeviceScreen
- One physical display of a device.
- DeviceSpec
- A device in the catalog.
- DisplayFeature
- Area of the display that may be obstructed by a hardware feature.
- FrameLens
- A camera lens ring on the body of a closed foldable, outside the screen.
- 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.
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
- DeviceLabTester on WidgetTester
-
Drives
flutter_testfrom the same device specs as the preview.
Functions
-
goldenNameFor(
DeviceSpec device, {required String scenario, Orientation orientation = Orientation.portrait, FoldPosture posture = FoldPosture.flat}) → String -
A stable golden file name for
deviceunder the givenscenario.