From 192ee469c37c76f1948dd9898317dd48b95f5216 Mon Sep 17 00:00:00 2001 From: Foti Dim Date: Sun, 21 Dec 2025 10:58:54 +0100 Subject: [PATCH] Add tablet preview device --- example/lib/main_device_preview.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/example/lib/main_device_preview.dart b/example/lib/main_device_preview.dart index 5ea2d3b..7c55cc9 100644 --- a/example/lib/main_device_preview.dart +++ b/example/lib/main_device_preview.dart @@ -26,6 +26,12 @@ void main() async { physicalWidth: 1242, physicalHeight: 2688, ), + createCustomDevice( + name: 'App Store iPad 2752x2064', + physicalWidth: 2752, + physicalHeight: 2064, + deviceType: DeviceType.tablet, + ), ], tools: [ ...DevicePreview.defaultTools, @@ -55,6 +61,7 @@ DeviceInfo createCustomDevice({ required double physicalWidth, required double physicalHeight, double pixelRatio = 3.0, + DeviceType deviceType = DeviceType.phone, }) { final logicalWidth = physicalWidth / pixelRatio; final logicalHeight = physicalHeight / pixelRatio; @@ -62,7 +69,7 @@ DeviceInfo createCustomDevice({ return DeviceInfo( identifier: DeviceIdentifier( TargetPlatform.iOS, - DeviceType.phone, + deviceType, name, ), name: name,