DeviceStaging extension

Staging a widget test on a device, for tests that are not scenarios.

A scenario gets this from its axes and needs none of it. This is for the other lane: an ordinary testWidgets that has to render as something in particular.

on

Methods

applyCanvas(PreviewCanvas? canvas) → VoidCallback

Available on WidgetTester, provided by the DeviceStaging extension

applyDevice with the head of canvas — what that list means everywhere else, so a test written against it agrees with the panel and with previews screenshot by construction rather than by care.
applyDevice(Device? device, {ScreenOrientation? orientation, KeyboardMode? keyboard}) → VoidCallback

Available on WidgetTester, provided by the DeviceStaging extension

Renders as device until the returned callback is run.