flutter_ios_preview 1.0.0
flutter_ios_preview: ^1.0.0 copied to clipboard
A premium Flutter tool for high-fidelity iOS simulation. Featuring the curated iphone Collection, dynamic notch/island hardware, and proportional scaling for cross-platform design testing.
flutter_ios_preview #
Test your iOS UI on Android, Windows, and Linux with pixel-perfect generational accuracy.
flutter_ios_preview is a premium development tool for Flutter engineers who want to experience how their apps look and feel on an iPhone, without needing a Mac or physical iOS hardware for every UI check.
✨ Key Features #
- 📱 Pro Max Collection: 9 curated High-Fidelity flagship models from the classic iPhone SE 3rd & 4th Gen and iPhone 8 Plus to the modern iPhone 17 Pro Max and iphone 18 Pro Max.
- 📏 6.9" Ultra Simulation: Supports the latest 2026 flagship resolutions (440 x 956) for the absolute largest canvas testing.
- 📐 Proportional Accuracy: Every model reflects its True Physical Proportions. Switching from an iPhone 8 Plus to an iPhone 18 Pro Max correctly changes the frame size on your screen.
- 🎨 Premium Hardware Frames: Realistic metallic borders, dynamic glass reflections, and physical-looking cutouts (Notch & Dynamic Island).
- 🔄 Auto-Sync Orientation: No manual toggles needed. Tilt your physical device, and the preview Automatically rotates to landscape.
- 🔍 Glassmorphism Inspector: A modern, translucent overlay for real-time widget metric tracking (Size, Constraints, Parent Type).
- 📸 High-Res Screenshot Export: Capture the entire device frame as a PNG for design review (Desktop/Android).
📸 Screenshot Management #
The plugin features a high-fidelity ScreenshotHandler that renders the specific device frame and boundary accurately.
- Desktop (Windows/macOS/Linux): Screenshots are saved directly to your Desktop for instant access.
- Mobile (Android/iOS): Screenshots are saved directly to your Photos/Gallery app.
🔐 Permission Configuration (Mobile Only) #
To enable gallery saving on mobile devices, add the following to your project:
iOS (ios/Runner/Info.plist)
<key>NSPhotoLibraryAddUsageDescription</key>
<string>This app needs permission to save screenshots to your gallery.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app needs access to your photo library to save simulation captures.</string>
Android (android/app/src/main/AndroidManifest.xml)
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" />
🚀 Getting Started #
Add the dependency to your pubspec.yaml:
dependencies:
flutter_ios_preview: ^1.0.0
🛠️ Usage #
Wrap your main application widget with IosPreview:
import 'package:flutter_ios_preview/flutter_ios_preview.dart';
void main() {
runApp(
const IosPreview(
deviceModel: DeviceModel.iPhone16ProMax, // Choose from 9 premium flagship models
enableInspector: true,
child: MyApp(),
),
);
}
Pro-Tips #
- Auto-Orientation: Simply rotate your physical device to see the iPhone frame switch between Portrait and Landscape automatically.
- Relative Scale: Notice how the iPhone 8 Plus frame is visually different in size from the iPhone 18 Pro Max, preserving real-world scale on your development machine.
- Inspector: Tap any widget with the inspector enabled to see deep metrics in a sleek, glass-morphic panel.
📄 License #
This project is licensed under the MIT License - see the LICENSE file for details.