├── .gitignore ├── .vscode └── launch.json ├── LICENSE ├── README.md ├── device_frame ├── .gitignore ├── .metadata ├── .pubignore ├── .vscode │ └── launch.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── example │ ├── .gitignore │ ├── .metadata │ ├── README.md │ ├── analysis_options.yaml │ ├── android │ │ ├── .gitignore │ │ ├── app │ │ │ ├── build.gradle │ │ │ └── src │ │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ │ ├── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── kotlin │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── example │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ └── res │ │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── values-night │ │ │ │ │ └── styles.xml │ │ │ │ │ └── values │ │ │ │ │ └── styles.xml │ │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ └── gradle-wrapper.properties │ │ └── settings.gradle │ ├── ios │ │ ├── .gitignore │ │ ├── Flutter │ │ │ ├── AppFrameworkInfo.plist │ │ │ ├── Debug.xcconfig │ │ │ └── Release.xcconfig │ │ ├── Runner.xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ │ └── WorkspaceSettings.xcsettings │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── Runner.xcscheme │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── Runner │ │ │ ├── AppDelegate.swift │ │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ │ └── LaunchImage.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ └── README.md │ │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ │ ├── Info.plist │ │ │ └── Runner-Bridging-Header.h │ ├── lib │ │ └── main.dart │ ├── macos │ │ ├── .gitignore │ │ ├── Flutter │ │ │ ├── Flutter-Debug.xcconfig │ │ │ ├── Flutter-Release.xcconfig │ │ │ └── GeneratedPluginRegistrant.swift │ │ ├── Runner.xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace │ │ │ │ └── xcshareddata │ │ │ │ │ └── IDEWorkspaceChecks.plist │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── Runner.xcscheme │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── Runner │ │ │ ├── AppDelegate.swift │ │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── app_icon_1024.png │ │ │ │ ├── app_icon_128.png │ │ │ │ ├── app_icon_16.png │ │ │ │ ├── app_icon_256.png │ │ │ │ ├── app_icon_32.png │ │ │ │ ├── app_icon_512.png │ │ │ │ └── app_icon_64.png │ │ │ ├── Base.lproj │ │ │ └── MainMenu.xib │ │ │ ├── Configs │ │ │ ├── AppInfo.xcconfig │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ └── Warnings.xcconfig │ │ │ ├── DebugProfile.entitlements │ │ │ ├── Info.plist │ │ │ ├── MainFlutterWindow.swift │ │ │ └── Release.entitlements │ ├── pubspec.yaml │ └── web │ │ ├── favicon.png │ │ ├── icons │ │ ├── Icon-192.png │ │ ├── Icon-512.png │ │ ├── Icon-maskable-192.png │ │ └── Icon-maskable-512.png │ │ ├── index.html │ │ └── manifest.json ├── lib │ ├── device_frame.dart │ └── src │ │ ├── devices │ │ ├── android │ │ │ ├── devices.dart │ │ │ ├── oneplus_8_pro │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ │ ├── samsung_galaxy_a50 │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ │ ├── samsung_galaxy_note20 │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ │ ├── samsung_galaxy_note20_ultra │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ │ ├── samsung_galaxy_s20 │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ │ └── sony_xperia_1_ii │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ ├── devices.dart │ │ ├── generic │ │ │ ├── base │ │ │ │ └── draw_extensions.dart │ │ │ ├── desktop_monitor │ │ │ │ ├── device.dart │ │ │ │ └── frame.dart │ │ │ ├── laptop │ │ │ │ ├── device.dart │ │ │ │ └── frame.dart │ │ │ ├── phone │ │ │ │ ├── device.dart │ │ │ │ └── frame.dart │ │ │ └── tablet │ │ │ │ ├── device.dart │ │ │ │ └── frame.dart │ │ ├── ios │ │ │ ├── devices.dart │ │ │ ├── ipad │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ │ ├── ipad_air_4 │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ │ ├── ipad_pro_11inches │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ │ ├── ipad_pro_12Inches_gen2 │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ │ ├── ipad_pro_12Inches_gen4 │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ │ ├── iphone_12 │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ │ ├── iphone_12_mini │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ │ ├── iphone_12_pro_max │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ │ ├── iphone_13 │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ │ ├── iphone_13_mini │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ │ ├── iphone_13_pro_max │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ │ └── iphone_se │ │ │ │ ├── device.dart │ │ │ │ ├── frame.g.dart │ │ │ │ └── screen.g.dart │ │ ├── linux │ │ │ └── devices.dart │ │ ├── macos │ │ │ ├── devices.dart │ │ │ └── macbook_pro │ │ │ │ ├── device.dart │ │ │ │ └── frame.dart │ │ └── windows │ │ │ └── devices.dart │ │ ├── frame.dart │ │ ├── info │ │ ├── device_type.dart │ │ ├── identifier.dart │ │ ├── info.dart │ │ └── info.freezed.dart │ │ ├── keyboard │ │ ├── button.dart │ │ └── virtual_keyboard.dart │ │ ├── theme.dart │ │ └── theme.freezed.dart ├── pubspec.yaml └── test │ ├── devices │ ├── android_phone_big.png │ ├── android_phone_medium.png │ ├── android_phone_oneplus-8-pro.png │ ├── android_phone_samsung-galaxy-a50.png │ ├── android_phone_samsung-galaxy-note20-ultra.png │ ├── android_phone_samsung-galaxy-note20.png │ ├── android_phone_samsung-galaxy-s20.png │ ├── android_phone_small.png │ ├── android_phone_sony-xperia-1-ii.png │ ├── android_tablet_large.png │ ├── android_tablet_medium.png │ ├── android_tablet_small.png │ ├── ios_phone_iphone-12-mini.png │ ├── ios_phone_iphone-12-pro-max.png │ ├── ios_phone_iphone-12.png │ ├── ios_phone_iphone-13-mini.png │ ├── ios_phone_iphone-13-pro-max.png │ ├── ios_phone_iphone-13.png │ ├── ios_phone_iphone-se.png │ ├── ios_tablet_ipad-air-4.png │ ├── ios_tablet_ipad-pad-pro-11inches.png │ ├── ios_tablet_ipad.png │ ├── linux_desktop_large.png │ ├── linux_laptop_laptop.png │ ├── macos_desktop_large.png │ ├── macos_laptop_macbook-pro.png │ ├── windows_desktop_large.png │ └── windows_laptop_laptop.png │ └── devices_golden_test.dart ├── device_preview.code-workspace ├── device_preview.gif ├── device_preview ├── .DS_Store ├── .firebase │ └── hosting.ZXhhbXBsZS9idWlsZC93ZWI.cache ├── .firebaserc ├── .gitignore ├── .vscode │ └── launch.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── deploy_gallery.sh ├── example │ ├── .gitignore │ ├── .metadata │ ├── README.md │ ├── analysis_options.yaml │ ├── android │ │ ├── .gitignore │ │ ├── app │ │ │ ├── build.gradle │ │ │ └── src │ │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ │ ├── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── kotlin │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── example │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ └── res │ │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── values-night │ │ │ │ │ └── styles.xml │ │ │ │ │ └── values │ │ │ │ │ └── styles.xml │ │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ └── gradle-wrapper.properties │ │ └── settings.gradle │ ├── ios │ │ ├── .gitignore │ │ ├── Flutter │ │ │ ├── AppFrameworkInfo.plist │ │ │ ├── Debug.xcconfig │ │ │ └── Release.xcconfig │ │ ├── Podfile │ │ ├── Podfile.lock │ │ ├── Runner.xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ │ └── WorkspaceSettings.xcsettings │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── Runner.xcscheme │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── Runner │ │ │ ├── AppDelegate.swift │ │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ │ └── LaunchImage.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ └── README.md │ │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ │ ├── Info.plist │ │ │ └── Runner-Bridging-Header.h │ ├── lib │ │ ├── basic.dart │ │ ├── custom_plugin.dart │ │ ├── generated_plugin_registrant.dart │ │ └── main.dart │ ├── linux │ │ ├── .gitignore │ │ ├── CMakeLists.txt │ │ ├── flutter │ │ │ ├── CMakeLists.txt │ │ │ ├── generated_plugin_registrant.cc │ │ │ ├── generated_plugin_registrant.h │ │ │ └── generated_plugins.cmake │ │ ├── main.cc │ │ ├── my_application.cc │ │ └── my_application.h │ ├── macos │ │ ├── .gitignore │ │ ├── Flutter │ │ │ ├── Flutter-Debug.xcconfig │ │ │ ├── Flutter-Release.xcconfig │ │ │ └── GeneratedPluginRegistrant.swift │ │ ├── Podfile │ │ ├── Podfile.lock │ │ ├── Runner.xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace │ │ │ │ └── xcshareddata │ │ │ │ │ └── IDEWorkspaceChecks.plist │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── Runner.xcscheme │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── Runner │ │ │ ├── AppDelegate.swift │ │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── app_icon_1024.png │ │ │ │ ├── app_icon_128.png │ │ │ │ ├── app_icon_16.png │ │ │ │ ├── app_icon_256.png │ │ │ │ ├── app_icon_32.png │ │ │ │ ├── app_icon_512.png │ │ │ │ └── app_icon_64.png │ │ │ ├── Base.lproj │ │ │ └── MainMenu.xib │ │ │ ├── Configs │ │ │ ├── AppInfo.xcconfig │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ └── Warnings.xcconfig │ │ │ ├── DebugProfile.entitlements │ │ │ ├── Info.plist │ │ │ ├── MainFlutterWindow.swift │ │ │ └── Release.entitlements │ ├── pubspec.yaml │ ├── web │ │ ├── favicon.png │ │ ├── icons │ │ │ ├── Icon-192.png │ │ │ ├── Icon-512.png │ │ │ ├── Icon-maskable-192.png │ │ │ └── Icon-maskable-512.png │ │ ├── index.html │ │ └── manifest.json │ └── windows │ │ ├── .gitignore │ │ ├── CMakeLists.txt │ │ ├── flutter │ │ ├── CMakeLists.txt │ │ ├── generated_plugin_registrant.cc │ │ ├── generated_plugin_registrant.h │ │ └── generated_plugins.cmake │ │ └── runner │ │ ├── CMakeLists.txt │ │ ├── Runner.rc │ │ ├── flutter_window.cpp │ │ ├── flutter_window.h │ │ ├── main.cpp │ │ ├── resource.h │ │ ├── resources │ │ └── app_icon.ico │ │ ├── runner.exe.manifest │ │ ├── utils.cpp │ │ ├── utils.h │ │ ├── win32_window.cpp │ │ └── win32_window.h ├── firebase.json ├── lib │ ├── .DS_Store │ ├── device_preview.dart │ └── src │ │ ├── device_preview.dart │ │ ├── locales │ │ ├── default_locales.dart │ │ └── locales.dart │ │ ├── state │ │ ├── custom_device.dart │ │ ├── state.dart │ │ ├── state.freezed.dart │ │ ├── state.g.dart │ │ └── store.dart │ │ ├── storage │ │ ├── file │ │ │ ├── file.dart │ │ │ ├── file_io.dart │ │ │ ├── file_mock.dart │ │ │ └── file_web.dart │ │ ├── preferences │ │ │ ├── preferences.dart │ │ │ ├── preferences_io.dart │ │ │ ├── preferences_mock.dart │ │ │ └── preferences_web.dart │ │ └── storage.dart │ │ ├── utilities │ │ ├── assert_inherited_media_query.dart │ │ ├── json_converters.dart │ │ ├── media_query_observer.dart │ │ └── screenshot.dart │ │ └── views │ │ ├── large.dart │ │ ├── small.dart │ │ ├── theme.dart │ │ └── tool_panel │ │ ├── sections │ │ ├── accessibility.dart │ │ ├── device.dart │ │ ├── section.dart │ │ ├── settings.dart │ │ ├── subsections │ │ │ ├── custom_device.dart │ │ │ ├── device_model.dart │ │ │ └── locale.dart │ │ └── system.dart │ │ ├── tool_panel.dart │ │ └── widgets │ │ ├── device_type_icon.dart │ │ ├── search_field.dart │ │ └── target_platform_icon.dart └── pubspec.yaml ├── devtools_device_preview ├── .gitignore ├── .metadata ├── .vscode │ └── launch.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── example │ ├── .gitignore │ ├── .metadata │ ├── README.md │ ├── analysis_options.yaml │ ├── android │ │ ├── .gitignore │ │ ├── app │ │ │ ├── build.gradle │ │ │ └── src │ │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ │ ├── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── kotlin │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── example │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ └── res │ │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── values-night │ │ │ │ │ └── styles.xml │ │ │ │ │ └── values │ │ │ │ │ └── styles.xml │ │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ └── gradle-wrapper.properties │ │ └── settings.gradle │ ├── ios │ │ ├── .gitignore │ │ ├── Flutter │ │ │ ├── AppFrameworkInfo.plist │ │ │ ├── Debug.xcconfig │ │ │ └── Release.xcconfig │ │ ├── Runner.xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ │ └── WorkspaceSettings.xcsettings │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── Runner.xcscheme │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── Runner │ │ │ ├── AppDelegate.swift │ │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ │ └── LaunchImage.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ └── README.md │ │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ │ ├── Info.plist │ │ │ └── Runner-Bridging-Header.h │ ├── lib │ │ └── main.dart │ ├── pubspec.yaml │ ├── test │ │ └── widget_test.dart │ └── web │ │ ├── favicon.png │ │ ├── icons │ │ ├── Icon-192.png │ │ ├── Icon-512.png │ │ ├── Icon-maskable-192.png │ │ └── Icon-maskable-512.png │ │ ├── index.html │ │ └── manifest.json ├── lib │ ├── devtools_device_preview.dart │ └── src │ │ ├── binding │ │ ├── binding.dart │ │ ├── render_view.dart │ │ └── window.dart │ │ ├── helpers │ │ └── transforms.dart │ │ └── tools.dart └── pubspec.yaml ├── docs ├── .DS_Store ├── README.md ├── _coverpage.md ├── _sidebar.md ├── content │ ├── .DS_Store │ ├── contributing │ │ ├── device_proposal.md │ │ └── other.md │ ├── plugins │ │ ├── .DS_Store │ │ ├── custom.md │ │ ├── images │ │ │ ├── custom.png │ │ │ └── screenshot.png │ │ └── screenshot.md │ └── usage │ │ ├── .DS_Store │ │ ├── device_frame.md │ │ ├── images │ │ └── manual.png │ │ ├── install.md │ │ ├── options.md │ │ └── tools.md ├── css │ ├── code.css │ └── main.css ├── images │ ├── cover.png │ ├── github_logo.svg │ ├── logo.png │ └── pub_logo.svg ├── index.html └── js │ └── prism-dart.js ├── logo.png └── plugins └── device_preview_screenshot ├── .gitignore ├── .metadata ├── .vscode └── launch.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── example ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── example │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-night │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Podfile │ ├── Podfile.lock │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── Runner-Bridging-Header.h ├── lib │ └── main.dart ├── macos │ ├── .gitignore │ ├── Flutter │ │ ├── Flutter-Debug.xcconfig │ │ ├── Flutter-Release.xcconfig │ │ └── GeneratedPluginRegistrant.swift │ ├── Podfile │ ├── Podfile.lock │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ └── app_icon_64.png │ │ ├── Base.lproj │ │ └── MainMenu.xib │ │ ├── Configs │ │ ├── AppInfo.xcconfig │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── Warnings.xcconfig │ │ ├── DebugProfile.entitlements │ │ ├── Info.plist │ │ ├── MainFlutterWindow.swift │ │ └── Release.entitlements ├── pubspec.yaml └── web │ ├── favicon.png │ ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png │ ├── index.html │ └── manifest.json ├── lib ├── device_preview_screenshot.dart └── src │ ├── processors │ ├── base64.dart │ ├── file.dart │ └── processor.dart │ └── section.dart └── pubspec.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://www.dartlang.org/guides/libraries/private-files 2 | 3 | # Files and directories created by pub 4 | .dart_tool/ 5 | .packages 6 | .pub/ 7 | build/ 8 | 9 | # If you're building an application, you may want to check-in your pubspec.lock 10 | pubspec.lock 11 | 12 | # Directory created by dartdoc 13 | # If you don't generate documentation locally you can remove this line. 14 | doc/api/ 15 | tools/.fvm/flutter_sdk 16 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Device Frame Example", 9 | "program": "device_frame/example/lib/main.dart", 10 | "request": "launch", 11 | "type": "dart" 12 | }, 13 | { 14 | "name": "Example", 15 | "program": "device_preview/example/lib/main.dart", 16 | "request": "launch", 17 | "type": "dart" 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /device_frame/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: e6b34c2b5c96bb95325269a29a84e83ed8909b5f 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /device_frame/.pubignore: -------------------------------------------------------------------------------- 1 | test/devices/ 2 | build/ 3 | example/build/ -------------------------------------------------------------------------------- /device_frame/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "example", 9 | "cwd": "example", 10 | "request": "launch", 11 | "type": "dart" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /device_frame/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | errors: 5 | missing_required_param: error 6 | missing_return: error 7 | always_declare_return_types: error 8 | 9 | exclude: 10 | - lib/**/*.g.dart 11 | - lib/**/*.freezed.dart 12 | 13 | linter: 14 | rules: 15 | - require_trailing_commas 16 | -------------------------------------------------------------------------------- /device_frame/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /device_frame/example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 18116933e77adc82f80866c928266a5b4f1ed645 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /device_frame/example/README.md: -------------------------------------------------------------------------------- 1 | # example 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /device_frame/example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /device_frame/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /device_frame/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /device_frame/example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /device_frame/example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /device_frame/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /device_frame/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /device_frame/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /device_frame/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /device_frame/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /device_frame/example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /device_frame/example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /device_frame/example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /device_frame/example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /device_frame/example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /device_frame/example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /device_frame/example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /device_frame/example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /device_frame/example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /device_frame/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /device_frame/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /device_frame/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /device_frame/example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /device_frame/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /device_frame/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /device_frame/example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /device_frame/example/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /device_frame/example/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /device_frame/example/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /device_frame/example/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | 9 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 10 | } 11 | -------------------------------------------------------------------------------- /device_frame/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /device_frame/example/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /device_frame/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /device_frame/example/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /device_frame/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /device_frame/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /device_frame/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /device_frame/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /device_frame/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /device_frame/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /device_frame/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /device_frame/example/macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = example 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2021 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /device_frame/example/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /device_frame/example/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /device_frame/example/macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /device_frame/example/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /device_frame/example/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /device_frame/example/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /device_frame/example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/web/favicon.png -------------------------------------------------------------------------------- /device_frame/example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /device_frame/example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /device_frame/example/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /device_frame/example/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/example/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /device_frame/example/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "short_name": "example", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /device_frame/lib/device_frame.dart: -------------------------------------------------------------------------------- 1 | library device_frame; 2 | 3 | export 'src/devices/devices.dart'; 4 | export 'src/frame.dart'; 5 | export 'src/info/device_type.dart'; 6 | export 'src/info/identifier.dart'; 7 | export 'src/info/info.dart'; 8 | export 'src/keyboard/virtual_keyboard.dart'; 9 | export 'src/theme.dart'; 10 | export 'src/devices/generic/desktop_monitor/device.dart'; 11 | export 'src/devices/generic/laptop/device.dart'; 12 | export 'src/devices/generic/phone/device.dart'; 13 | export 'src/devices/generic/tablet/device.dart'; 14 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/android/oneplus_8_pro/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.android, 12 | DeviceType.phone, 13 | 'oneplus-8-pro', 14 | ), 15 | name: 'OnePlus 8 Pro', 16 | pixelRatio: 4.0, 17 | safeAreas: const EdgeInsets.only( 18 | left: 0.0, 19 | top: 40.0, 20 | right: 0.0, 21 | bottom: 20.0, 22 | ), 23 | rotatedSafeAreas: const EdgeInsets.only( 24 | left: 40.0, 25 | top: 24.0, 26 | right: 40.0, 27 | bottom: 0.0, 28 | ), 29 | framePainter: const _FramePainter(), 30 | screenPath: _screenPath, 31 | frameSize: const Size(852, 1865.0), 32 | screenSize: const Size(360.0, 800.0), 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/android/samsung_galaxy_a50/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.android, 12 | DeviceType.phone, 13 | 'samsung-galaxy-a50', 14 | ), 15 | name: 'Samsung Galaxy A50', 16 | pixelRatio: 2.625, 17 | safeAreas: const EdgeInsets.only( 18 | left: 0.0, 19 | top: 32.0, 20 | right: 0.0, 21 | bottom: 32.0, 22 | ), 23 | rotatedSafeAreas: const EdgeInsets.only( 24 | left: 32.0, 25 | top: 24.0, 26 | right: 32.0, 27 | bottom: 0.0, 28 | ), 29 | framePainter: const _FramePainter(), 30 | screenPath: _screenPath, 31 | frameSize: const Size(868, 1829.84), 32 | screenSize: const Size(412.0, 892.0), 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/android/samsung_galaxy_note20/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.android, 12 | DeviceType.phone, 13 | 'samsung-galaxy-note20', 14 | ), 15 | name: 'Samsung Galaxy Note 20', 16 | pixelRatio: 2.625, 17 | safeAreas: const EdgeInsets.only( 18 | left: 0.0, 19 | top: 48.0, 20 | right: 0.0, 21 | bottom: 32.0, 22 | ), 23 | rotatedSafeAreas: const EdgeInsets.only( 24 | left: 48.0, 25 | top: 24.0, 26 | right: 48.0, 27 | bottom: 0.0, 28 | ), 29 | framePainter: const _FramePainter(), 30 | screenPath: _screenPath, 31 | frameSize: const Size(834, 1788.93), 32 | screenSize: const Size(412.0, 916.0), 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/android/samsung_galaxy_note20/screen.g.dart: -------------------------------------------------------------------------------- 1 | part of 'device.dart'; 2 | 3 | // Generated manually with https://fluttershapemaker.com/ 4 | final _screenPath = Path() 5 | ..moveTo(27.105, 83.4) 6 | ..cubicTo(27.105, 52.3091, 52.3091, 27.105, 83.4, 27.105) 7 | ..lineTo(744.345, 27.105) 8 | ..cubicTo(775.436, 27.105, 800.64, 52.3091, 800.64, 83.4) 9 | ..lineTo(800.64, 1688.85) 10 | ..cubicTo(800.64, 1719.94, 775.436, 1745.15, 744.345, 1745.15) 11 | ..lineTo(83.4, 1745.15) 12 | ..cubicTo(52.3091, 1745.15, 27.105, 1719.94, 27.105, 1688.85) 13 | ..lineTo(27.105, 83.4) 14 | ..close() 15 | ..moveTo(435.785, 69.8925) 16 | ..cubicTo(435.785, 81.9834, 425.983, 91.785, 413.892, 91.785) 17 | ..cubicTo(401.802, 91.785, 392, 81.9834, 392, 69.8925) 18 | ..cubicTo(392, 57.8016, 401.802, 48, 413.892, 48) 19 | ..cubicTo(425.983, 48, 435.785, 57.8016, 435.785, 69.8925) 20 | ..close() 21 | ..fillType = PathFillType.evenOdd; 22 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/android/samsung_galaxy_note20_ultra/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.android, 12 | DeviceType.phone, 13 | 'samsung-galaxy-note20-ultra', 14 | ), 15 | name: 'Samsung Galaxy Note 20 Ultra', 16 | pixelRatio: 3.5, 17 | safeAreas: const EdgeInsets.only( 18 | left: 0.0, 19 | top: 36.0, 20 | right: 0.0, 21 | bottom: 24.0, 22 | ), 23 | rotatedSafeAreas: const EdgeInsets.only( 24 | left: 36.0, 25 | top: 24.0, 26 | right: 36.0, 27 | bottom: 0.0, 28 | ), 29 | framePainter: const _FramePainter(), 30 | screenPath: _screenPath, 31 | frameSize: const Size(801, 1713.86), 32 | screenSize: const Size(412, 883), 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/android/samsung_galaxy_s20/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.android, 12 | DeviceType.phone, 13 | 'samsung-galaxy-s20', 14 | ), 15 | name: 'Samsung Galaxy S20', 16 | pixelRatio: 4.0, 17 | safeAreas: const EdgeInsets.only( 18 | left: 0.0, 19 | top: 32.0, 20 | right: 0.0, 21 | bottom: 32.0, 22 | ), 23 | rotatedSafeAreas: const EdgeInsets.only( 24 | left: 32.0, 25 | top: 24.0, 26 | right: 32.0, 27 | bottom: 0.0, 28 | ), 29 | framePainter: const _FramePainter(), 30 | screenPath: _screenPath, 31 | frameSize: const Size(856.54, 1899.0), 32 | screenSize: const Size(360.0, 800.0), 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/android/samsung_galaxy_s20/screen.g.dart: -------------------------------------------------------------------------------- 1 | part of 'device.dart'; 2 | 3 | // Generated manually with https://fluttershapemaker.com/ 4 | final _screenPath = Path() 5 | ..moveTo(19.9199, 110.664) 6 | ..cubicTo(19.9199, 67.8815, 54.6022, 33.1992, 97.385, 33.1992) 7 | ..lineTo(761.371, 33.1992) 8 | ..cubicTo(804.154, 33.1992, 838.836, 67.8815, 838.836, 110.664) 9 | ..lineTo(838.836, 1775.06) 10 | ..cubicTo(838.836, 1817.84, 804.154, 1852.52, 761.371, 1852.52) 11 | ..lineTo(97.385, 1852.52) 12 | ..cubicTo(54.6022, 1852.52, 19.9199, 1817.84, 19.9199, 1775.06) 13 | ..lineTo(19.9199, 110.664) 14 | ..close() 15 | ..moveTo(425.133, 91.2657) 16 | ..cubicTo(437.357, 91.2657, 447.266, 81.3565, 447.266, 69.1329) 17 | ..cubicTo(447.266, 56.9092, 437.357, 47, 425.133, 47) 18 | ..cubicTo(412.909, 47, 403, 56.9092, 403, 69.1329) 19 | ..cubicTo(403, 81.3565, 412.909, 91.2657, 425.133, 91.2657) 20 | ..close() 21 | ..fillType = PathFillType.evenOdd; 22 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/android/sony_xperia_1_ii/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.android, 12 | DeviceType.phone, 13 | 'sony-xperia-1-ii', 14 | ), 15 | name: 'Sony Xperia 1 II', 16 | pixelRatio: 4.0, 17 | safeAreas: const EdgeInsets.only( 18 | left: 0.0, 19 | top: 24.0, 20 | right: 0.0, 21 | bottom: 0.0, 22 | ), 23 | rotatedSafeAreas: const EdgeInsets.only( 24 | left: 0.0, 25 | top: 24.0, 26 | right: 0.0, 27 | bottom: 0.0, 28 | ), 29 | framePainter: const _FramePainter(), 30 | screenPath: _screenPath, 31 | frameSize: const Size(760, 1757.63), 32 | screenSize: const Size(1644 / 4, 3840 / 4), 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/android/sony_xperia_1_ii/screen.g.dart: -------------------------------------------------------------------------------- 1 | part of 'device.dart'; 2 | 3 | // Generated manually with https://fluttershapemaker.com/ 4 | final _screenPath = Path() 5 | ..moveTo(51.2127, 75.7949) 6 | ..cubicTo(39.8991, 75.7949, 30.7275, 84.9665, 30.7275, 96.2802) 7 | ..lineTo(30.7275, 1667.49) 8 | ..cubicTo(30.7275, 1678.81, 39.8991, 1687.98, 51.2127, 1687.98) 9 | ..lineTo(702.641, 1687.98) 10 | ..cubicTo(713.955, 1687.98, 723.126, 1678.81, 723.126, 1667.49) 11 | ..lineTo(723.126, 96.2801) 12 | ..cubicTo(723.126, 84.9664, 713.955, 75.7949, 702.641, 75.7949) 13 | ..lineTo(51.2127, 75.7949) 14 | ..close() 15 | ..fillType = PathFillType.evenOdd; 16 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/devices.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/info.dart'; 2 | 3 | import 'android/devices.dart'; 4 | import 'ios/devices.dart'; 5 | import 'linux/devices.dart'; 6 | import 'windows/devices.dart'; 7 | import 'macos/devices.dart'; 8 | 9 | /// A list of common device specifications sorted by target platform. 10 | abstract class Devices { 11 | /// All iOS devices. 12 | static const ios = IosDevices(); 13 | 14 | /// All macOS devices. 15 | static const macOS = MacOSDevices(); 16 | 17 | /// All Android devices. 18 | static const android = AndroidDevices(); 19 | 20 | /// All Windows devices. 21 | static const windows = WindowsDevices(); 22 | 23 | /// All Linux devices. 24 | static const linux = LinuxDevices(); 25 | 26 | /// All available devices. 27 | static List get all => [ 28 | ...ios.all, 29 | ...android.all, 30 | ...windows.all, 31 | ...macOS.all, 32 | ...linux.all, 33 | ]; 34 | } 35 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/ipad/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.iOS, 12 | DeviceType.tablet, 13 | 'ipad', 14 | ), 15 | name: 'iPad', 16 | pixelRatio: 2.0, 17 | frameSize: const Size(1673, 2409), 18 | screenSize: const Size(810.0, 1080.0), 19 | safeAreas: const EdgeInsets.only( 20 | left: 0.0, 21 | top: 20.0, 22 | right: 0.0, 23 | bottom: 0.0, 24 | ), 25 | rotatedSafeAreas: const EdgeInsets.only( 26 | left: 0.0, 27 | top: 20.0, 28 | right: 0.0, 29 | bottom: 0.0, 30 | ), 31 | framePainter: const _FramePainter(), 32 | screenPath: _screenPath, 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/ipad/screen.g.dart: -------------------------------------------------------------------------------- 1 | part of 'device.dart'; 2 | 3 | // Generated manually with https://fluttershapemaker.com/ 4 | final _screenPath = Path() 5 | ..moveTo(1606, 176.66) 6 | ..lineTo(66.917, 176.66) 7 | ..lineTo(66.917, 2229.66) 8 | ..lineTo(1606, 2229.66) 9 | ..lineTo(1606, 176.66) 10 | ..close() 11 | ..fillType = PathFillType.evenOdd; 12 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/ipad_air_4/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.iOS, 12 | DeviceType.tablet, 13 | 'ipad-air-4', 14 | ), 15 | name: 'iPad Air 4', 16 | pixelRatio: 3.0, 17 | frameSize: const Size(1811.0, 2509.0), 18 | screenSize: const Size(820.0, 1180.0), 19 | safeAreas: const EdgeInsets.only( 20 | left: 0.0, 21 | top: 20.0, 22 | right: 0.0, 23 | bottom: 0.0, 24 | ), 25 | rotatedSafeAreas: const EdgeInsets.only( 26 | left: 0.0, 27 | top: 20.0, 28 | right: 0.0, 29 | bottom: 0.0, 30 | ), 31 | framePainter: const _FramePainter(), 32 | screenPath: _screenPath, 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/ipad_air_4/screen.g.dart: -------------------------------------------------------------------------------- 1 | part of 'device.dart'; 2 | 3 | // Generated manually with https://fluttershapemaker.com/ 4 | final _screenPath = Path() 5 | ..moveTo(141.875, 111.275) 6 | ..cubicTo(121.902, 111.275, 105.711, 127.466, 105.711, 147.439) 7 | ..lineTo(105.711, 2367.37) 8 | ..cubicTo(105.711, 2387.35, 121.902, 2403.54, 141.875, 2403.54) 9 | ..lineTo(1663.56, 2403.54) 10 | ..cubicTo(1683.53, 2403.54, 1699.72, 2387.35, 1699.72, 2367.37) 11 | ..lineTo(1699.72, 147.439) 12 | ..cubicTo(1699.72, 127.466, 1683.53, 111.275, 1663.56, 111.275) 13 | ..lineTo(141.875, 111.275) 14 | ..close() 15 | ..fillType = PathFillType.evenOdd; 16 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/ipad_pro_11inches/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.iOS, 12 | DeviceType.tablet, 13 | 'ipad-pad-pro-11inches', 14 | ), 15 | name: 'iPad Pro (11")', 16 | pixelRatio: 3.0, 17 | frameSize: const Size(1741.0, 2412.0), 18 | screenSize: const Size(834.0, 1194.0), 19 | safeAreas: const EdgeInsets.only( 20 | left: 0.0, 21 | top: 20.0, 22 | right: 0.0, 23 | bottom: 0.0, 24 | ), 25 | rotatedSafeAreas: const EdgeInsets.only( 26 | left: 0.0, 27 | top: 20.0, 28 | right: 0.0, 29 | bottom: 0.0, 30 | ), 31 | framePainter: const _FramePainter(), 32 | screenPath: _screenPath, 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/ipad_pro_11inches/screen.g.dart: -------------------------------------------------------------------------------- 1 | part of 'device.dart'; 2 | 3 | // Generated manually with https://fluttershapemaker.com/ 4 | final _screenPath = Path() 5 | ..moveTo(90.9277, 128.369) 6 | ..lineTo(90.9277, 2289.24) 7 | ..cubicTo(90.9277, 2306.97, 105.296, 2321.33, 123.02, 2321.33) 8 | ..lineTo(1612.63, 2321.33) 9 | ..cubicTo(1630.36, 2321.33, 1644.72, 2306.97, 1644.72, 2289.24) 10 | ..lineTo(1644.72, 128.369) 11 | ..cubicTo(1644.72, 110.645, 1630.36, 96.2765, 1612.63, 96.2765) 12 | ..lineTo(123.02, 96.2765) 13 | ..cubicTo(105.296, 96.2765, 90.9277, 110.645, 90.9277, 128.369) 14 | ..close() 15 | ..fillType = PathFillType.evenOdd; 16 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/ipad_pro_12Inches_gen2/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.iOS, 12 | DeviceType.tablet, 13 | 'ipad-pro-12inches-gen2', 14 | ), 15 | name: 'iPad Pro (12" gen 2)', 16 | pixelRatio: 2.0, 17 | frameSize: const Size(1744.0, 2409.0), 18 | screenSize: const Size(1024.0, 1366.0), 19 | safeAreas: const EdgeInsets.only( 20 | left: 0.0, 21 | top: 20.0, 22 | right: 0.0, 23 | bottom: 0.0, 24 | ), 25 | rotatedSafeAreas: const EdgeInsets.only( 26 | left: 0.0, 27 | top: 20.0, 28 | right: 0.0, 29 | bottom: 0.0, 30 | ), 31 | framePainter: const _FramePainter(), 32 | screenPath: _screenPath, 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/ipad_pro_12Inches_gen2/screen.g.dart: -------------------------------------------------------------------------------- 1 | part of 'device.dart'; 2 | 3 | // Generated manually with https://fluttershapemaker.com/ 4 | 5 | final _screenPath = Path() 6 | ..moveTo(1656.41, 161.872) 7 | ..lineTo(93.5703, 161.872) 8 | ..lineTo(93.5703, 2246.68) 9 | ..lineTo(1656.41, 2246.68) 10 | ..lineTo(1656.41, 161.872) 11 | ..close() 12 | ..fillType = PathFillType.evenOdd; 13 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/ipad_pro_12Inches_gen4/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | 8 | part 'screen.g.dart'; 9 | 10 | final info = DeviceInfo( 11 | identifier: const DeviceIdentifier( 12 | TargetPlatform.iOS, 13 | DeviceType.tablet, 14 | 'ipad-pro-12inches-gen4', 15 | ), 16 | name: 'iPad Pro (12" gen 4)', 17 | pixelRatio: 2.0, 18 | frameSize: const Size(1849.0, 2424.0), 19 | screenSize: const Size(1024, 1366.0), 20 | safeAreas: const EdgeInsets.only( 21 | left: 0.0, 22 | top: 24.0, 23 | right: 0.0, 24 | bottom: 20.0, 25 | ), 26 | rotatedSafeAreas: const EdgeInsets.only( 27 | left: 0.0, 28 | top: 24.0, 29 | right: 0.0, 30 | bottom: 20.0, 31 | ), 32 | framePainter: const _FramePainter(), 33 | screenPath: _screenPath, 34 | ); 35 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/ipad_pro_12Inches_gen4/screen.g.dart: -------------------------------------------------------------------------------- 1 | part of 'device.dart'; 2 | 3 | // Generated manually with https://fluttershapemaker.com/ 4 | Path _screenPath = Path() 5 | ..moveTo(77.7461, 126.292) 6 | ..lineTo(77.7461, 2314.52) 7 | ..cubicTo(77.7461, 2332.47, 93.3654, 2347.02, 112.633, 2347.02) 8 | ..lineTo(1731.96, 2347.02) 9 | ..cubicTo(1751.22, 2347.02, 1766.84, 2332.47, 1766.84, 2314.52) 10 | ..lineTo(1766.84, 126.292) 11 | ..cubicTo(1766.84, 108.344, 1751.22, 93.7939, 1731.96, 93.7939) 12 | ..lineTo(112.633, 93.7939) 13 | ..cubicTo(93.3654, 93.7939, 77.7461, 108.344, 77.7461, 126.292) 14 | ..close() 15 | ..fillType = PathFillType.evenOdd; 16 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/iphone_12/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.iOS, 12 | DeviceType.phone, 13 | 'iphone-12', 14 | ), 15 | name: 'iPhone 12', 16 | pixelRatio: 2.0, 17 | frameSize: const Size(873.0, 1771.0), 18 | screenSize: const Size(1024.0, 1366.0), 19 | safeAreas: const EdgeInsets.only( 20 | left: 0.0, 21 | top: 24.0, 22 | right: 0.0, 23 | bottom: 20.0, 24 | ), 25 | rotatedSafeAreas: const EdgeInsets.only( 26 | left: 0.0, 27 | top: 24.0, 28 | right: 0.0, 29 | bottom: 20.0, 30 | ), 31 | framePainter: const _FramePainter(), 32 | screenPath: _screenPath, 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/iphone_12_mini/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.iOS, 12 | DeviceType.phone, 13 | 'iphone-12-mini', 14 | ), 15 | name: 'iPhone 12 Mini', 16 | pixelRatio: 2.0, 17 | frameSize: const Size(871.0, 1768.0), 18 | screenSize: const Size(375.0, 812.0), 19 | safeAreas: const EdgeInsets.only( 20 | left: 0.0, 21 | top: 44.0, 22 | right: 0.0, 23 | bottom: 34.0, 24 | ), 25 | rotatedSafeAreas: const EdgeInsets.only( 26 | left: 44.0, 27 | top: 0.0, 28 | right: 44.0, 29 | bottom: 21.0, 30 | ), 31 | framePainter: const _FramePainter(), 32 | screenPath: _screenPath, 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/iphone_12_pro_max/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.iOS, 12 | DeviceType.phone, 13 | 'iphone-12-pro-max', 14 | ), 15 | name: 'iPhone 12 Pro Max', 16 | pixelRatio: 3.0, 17 | frameSize: const Size(873.0, 1770.0), 18 | screenSize: const Size(428.0, 926.0), 19 | safeAreas: const EdgeInsets.only( 20 | left: 0.0, 21 | top: 44.0, 22 | right: 0.0, 23 | bottom: 34.0, 24 | ), 25 | rotatedSafeAreas: const EdgeInsets.only( 26 | left: 44.0, 27 | top: 0.0, 28 | right: 44.0, 29 | bottom: 21.0, 30 | ), 31 | framePainter: const _FramePainter(), 32 | screenPath: _screenPath, 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/iphone_13/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.iOS, 12 | DeviceType.phone, 13 | 'iphone-13', 14 | ), 15 | name: 'iPhone 13', 16 | pixelRatio: 3.0, 17 | frameSize: const Size(873.0, 1771.0), 18 | screenSize: const Size(390.0, 844.0), 19 | safeAreas: const EdgeInsets.only( 20 | left: 0.0, 21 | top: 47.0, 22 | right: 0.0, 23 | bottom: 34.0, 24 | ), 25 | rotatedSafeAreas: const EdgeInsets.only( 26 | left: 47.0, 27 | top: 0.0, 28 | right: 47.0, 29 | bottom: 21.0, 30 | ), 31 | framePainter: const _FramePainter(), 32 | screenPath: _screenPath, 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/iphone_13_mini/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.iOS, 12 | DeviceType.phone, 13 | 'iphone-13-mini', 14 | ), 15 | name: 'iPhone 13 Mini', 16 | pixelRatio: 2.0, 17 | frameSize: const Size(871.0, 1768.0), 18 | screenSize: const Size(375.0, 812.0), 19 | safeAreas: const EdgeInsets.only( 20 | left: 0.0, 21 | top: 47.0, 22 | right: 0.0, 23 | bottom: 34.0, 24 | ), 25 | rotatedSafeAreas: const EdgeInsets.only( 26 | left: 47.0, 27 | top: 0.0, 28 | right: 44.0, 29 | bottom: 21.0, 30 | ), 31 | framePainter: const _FramePainter(), 32 | screenPath: _screenPath, 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/iphone_13_pro_max/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.iOS, 12 | DeviceType.phone, 13 | 'iphone-13-pro-max', 14 | ), 15 | name: 'iPhone 13 Pro Max', 16 | pixelRatio: 3.0, 17 | frameSize: const Size(873.0, 1770.0), 18 | screenSize: const Size(428.0, 926.0), 19 | safeAreas: const EdgeInsets.only( 20 | left: 0.0, 21 | top: 47.0, 22 | right: 0.0, 23 | bottom: 34.0, 24 | ), 25 | rotatedSafeAreas: const EdgeInsets.only( 26 | left: 47.0, 27 | top: 0.0, 28 | right: 47.0, 29 | bottom: 21.0, 30 | ), 31 | framePainter: const _FramePainter(), 32 | screenPath: _screenPath, 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/iphone_se/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/device_type.dart'; 2 | import 'package:device_frame/src/info/identifier.dart'; 3 | import 'package:device_frame/src/info/info.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | part 'frame.g.dart'; 7 | part 'screen.g.dart'; 8 | 9 | final info = DeviceInfo( 10 | identifier: const DeviceIdentifier( 11 | TargetPlatform.iOS, 12 | DeviceType.phone, 13 | 'iphone-se', 14 | ), 15 | name: 'iPhone SE', 16 | pixelRatio: 2.0, 17 | frameSize: const Size(891.0, 1790.0), 18 | screenSize: const Size(375.0, 667.0), 19 | safeAreas: const EdgeInsets.only( 20 | left: 0.0, 21 | top: 20.0, 22 | right: 0.0, 23 | bottom: 0.0, 24 | ), 25 | rotatedSafeAreas: const EdgeInsets.only( 26 | left: 0.0, 27 | top: 20.0, 28 | right: 0.0, 29 | bottom: 0.0, 30 | ), 31 | framePainter: const _FramePainter(), 32 | screenPath: _screenPath, 33 | ); 34 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/ios/iphone_se/screen.g.dart: -------------------------------------------------------------------------------- 1 | part of 'device.dart'; 2 | 3 | // Generated manually with https://fluttershapemaker.com/ 4 | final _screenPath = Path() 5 | ..moveTo(836.747, 198.193) 6 | ..lineTo(54.2529, 198.193) 7 | ..lineTo(54.2529, 1589.72) 8 | ..lineTo(836.747, 1589.72) 9 | ..lineTo(836.747, 198.193) 10 | ..close() 11 | ..fillType = PathFillType.evenOdd; 12 | -------------------------------------------------------------------------------- /device_frame/lib/src/devices/macos/devices.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_frame/src/info/info.dart'; 2 | import 'package:flutter/widgets.dart'; 3 | import 'package:device_frame/src/devices/macos/macbook_pro/device.dart' 4 | as i_macbook_pro; 5 | 6 | /// A set of macOS devices. 7 | class MacOSDevices { 8 | const MacOSDevices(); 9 | 10 | DeviceInfo get macBookPro => i_macbook_pro.info; 11 | DeviceInfo get wideMonitor => _wideMonitor; 12 | static final _wideMonitor = DeviceInfo.genericDesktopMonitor( 13 | platform: TargetPlatform.macOS, 14 | name: 'Large', 15 | id: 'large', 16 | screenSize: const Size(1920, 1080), 17 | windowPosition: Rect.fromCenter( 18 | center: const Offset( 19 | 1920 * 0.5, 20 | 1080 * 0.5, 21 | ), 22 | width: 1620, 23 | height: 780, 24 | ), 25 | ); 26 | 27 | /// All available devices. 28 | List get all => [ 29 | macBookPro, 30 | wideMonitor, 31 | ]; 32 | } 33 | -------------------------------------------------------------------------------- /device_frame/lib/src/info/device_type.dart: -------------------------------------------------------------------------------- 1 | /// A device form factor. 2 | enum DeviceType { 3 | /// Unknown type 4 | unknown, 5 | 6 | /// Smartphone 7 | phone, 8 | 9 | /// Tablet 10 | tablet, 11 | 12 | /// TV 13 | tv, 14 | 15 | /// Desktop computer 16 | desktop, 17 | 18 | /// Laptop 19 | laptop, 20 | } 21 | -------------------------------------------------------------------------------- /device_frame/lib/src/keyboard/button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | 3 | /// A [VirtualKeyboard] button. 4 | class VirtualKeyboardButton extends StatelessWidget { 5 | /// Creates a [VirtualKeyboardButton]. 6 | const VirtualKeyboardButton({ 7 | Key? key, 8 | required this.backgroundColor, 9 | required this.child, 10 | this.borderRadius = const BorderRadius.all(Radius.circular(4)), 11 | this.padding = const EdgeInsets.symmetric( 12 | vertical: 10, 13 | horizontal: 6, 14 | ), 15 | }) : super(key: key); 16 | 17 | final Widget child; 18 | final Color backgroundColor; 19 | final EdgeInsets padding; 20 | final BorderRadius borderRadius; 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return Container( 25 | decoration: BoxDecoration( 26 | color: backgroundColor, 27 | borderRadius: borderRadius, 28 | ), 29 | padding: padding, 30 | alignment: Alignment.center, 31 | child: child, 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /device_frame/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: device_frame 2 | description: Mockups for common devices. 3 | version: 1.2.0 4 | homepage: https://github.com/aloisdeniel/flutter_device_preview/device_frame 5 | 6 | environment: 7 | sdk: '>=3.4.0 <4.0.0' 8 | flutter: '>=3.2.0' 9 | 10 | dependencies: 11 | freezed_annotation: ^2.0.3 12 | flutter: 13 | sdk: flutter 14 | 15 | dev_dependencies: 16 | flutter_test: 17 | sdk: flutter 18 | build_runner: ^2.1.4 19 | json_serializable: ^6.0.1 20 | freezed: ^2.0.3 21 | flutter_lints: ^1.0.4 22 | xml: ^5.3.1 23 | recase: ^4.0.0 24 | -------------------------------------------------------------------------------- /device_frame/test/devices/android_phone_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/android_phone_big.png -------------------------------------------------------------------------------- /device_frame/test/devices/android_phone_medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/android_phone_medium.png -------------------------------------------------------------------------------- /device_frame/test/devices/android_phone_oneplus-8-pro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/android_phone_oneplus-8-pro.png -------------------------------------------------------------------------------- /device_frame/test/devices/android_phone_samsung-galaxy-a50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/android_phone_samsung-galaxy-a50.png -------------------------------------------------------------------------------- /device_frame/test/devices/android_phone_samsung-galaxy-note20-ultra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/android_phone_samsung-galaxy-note20-ultra.png -------------------------------------------------------------------------------- /device_frame/test/devices/android_phone_samsung-galaxy-note20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/android_phone_samsung-galaxy-note20.png -------------------------------------------------------------------------------- /device_frame/test/devices/android_phone_samsung-galaxy-s20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/android_phone_samsung-galaxy-s20.png -------------------------------------------------------------------------------- /device_frame/test/devices/android_phone_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/android_phone_small.png -------------------------------------------------------------------------------- /device_frame/test/devices/android_phone_sony-xperia-1-ii.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/android_phone_sony-xperia-1-ii.png -------------------------------------------------------------------------------- /device_frame/test/devices/android_tablet_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/android_tablet_large.png -------------------------------------------------------------------------------- /device_frame/test/devices/android_tablet_medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/android_tablet_medium.png -------------------------------------------------------------------------------- /device_frame/test/devices/android_tablet_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/android_tablet_small.png -------------------------------------------------------------------------------- /device_frame/test/devices/ios_phone_iphone-12-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/ios_phone_iphone-12-mini.png -------------------------------------------------------------------------------- /device_frame/test/devices/ios_phone_iphone-12-pro-max.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/ios_phone_iphone-12-pro-max.png -------------------------------------------------------------------------------- /device_frame/test/devices/ios_phone_iphone-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/ios_phone_iphone-12.png -------------------------------------------------------------------------------- /device_frame/test/devices/ios_phone_iphone-13-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/ios_phone_iphone-13-mini.png -------------------------------------------------------------------------------- /device_frame/test/devices/ios_phone_iphone-13-pro-max.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/ios_phone_iphone-13-pro-max.png -------------------------------------------------------------------------------- /device_frame/test/devices/ios_phone_iphone-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/ios_phone_iphone-13.png -------------------------------------------------------------------------------- /device_frame/test/devices/ios_phone_iphone-se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/ios_phone_iphone-se.png -------------------------------------------------------------------------------- /device_frame/test/devices/ios_tablet_ipad-air-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/ios_tablet_ipad-air-4.png -------------------------------------------------------------------------------- /device_frame/test/devices/ios_tablet_ipad-pad-pro-11inches.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/ios_tablet_ipad-pad-pro-11inches.png -------------------------------------------------------------------------------- /device_frame/test/devices/ios_tablet_ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/ios_tablet_ipad.png -------------------------------------------------------------------------------- /device_frame/test/devices/linux_desktop_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/linux_desktop_large.png -------------------------------------------------------------------------------- /device_frame/test/devices/linux_laptop_laptop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/linux_laptop_laptop.png -------------------------------------------------------------------------------- /device_frame/test/devices/macos_desktop_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/macos_desktop_large.png -------------------------------------------------------------------------------- /device_frame/test/devices/macos_laptop_macbook-pro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/macos_laptop_macbook-pro.png -------------------------------------------------------------------------------- /device_frame/test/devices/windows_desktop_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/windows_desktop_large.png -------------------------------------------------------------------------------- /device_frame/test/devices/windows_laptop_laptop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_frame/test/devices/windows_laptop_laptop.png -------------------------------------------------------------------------------- /device_preview.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "name": "device_frame", 5 | "path": "device_frame" 6 | }, 7 | { 8 | "name": "device_preview", 9 | "path": "device_preview" 10 | }, 11 | { 12 | "name": "devtools_device_preview", 13 | "path": "devtools_device_preview" 14 | }, 15 | { 16 | "name": "plugins/device_preview_screenshot", 17 | "path": "plugins/device_preview_screenshot" 18 | }, 19 | { 20 | "name": "docs", 21 | "path": "docs" 22 | } 23 | ], 24 | "settings": { 25 | "editor.formatOnPaste": true, 26 | "editor.formatOnSave": true, 27 | "editor.formatOnType": true, 28 | } 29 | } -------------------------------------------------------------------------------- /device_preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview.gif -------------------------------------------------------------------------------- /device_preview/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/.DS_Store -------------------------------------------------------------------------------- /device_preview/.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "flutter-device-preview" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /device_preview/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "DevicePreview Example", 9 | "request": "launch", 10 | "type": "dart", 11 | "program": "example/lib/main.dart" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /device_preview/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | errors: 5 | missing_required_param: error 6 | missing_return: error 7 | always_declare_return_types: error 8 | 9 | exclude: 10 | - lib/**/*.g.dart 11 | - lib/**/*.freezed.dart 12 | 13 | linter: 14 | rules: 15 | - require_trailing_commas 16 | -------------------------------------------------------------------------------- /device_preview/deploy_gallery.sh: -------------------------------------------------------------------------------- 1 | cd example 2 | flutter build web 3 | cd .. 4 | firebase deploy -------------------------------------------------------------------------------- /device_preview/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /device_preview/example/README.md: -------------------------------------------------------------------------------- 1 | # example 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /device_preview/example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /device_preview/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /device_preview/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /device_preview/example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /device_preview/example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /device_preview/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /device_preview/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /device_preview/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /device_preview/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /device_preview/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /device_preview/example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /device_preview/example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /device_preview/example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /device_preview/example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip 7 | -------------------------------------------------------------------------------- /device_preview/example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /device_preview/example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /device_preview/example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /device_preview/example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /device_preview/example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /device_preview/example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - shared_preferences_foundation (0.0.1): 4 | - Flutter 5 | - FlutterMacOS 6 | 7 | DEPENDENCIES: 8 | - Flutter (from `Flutter`) 9 | - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) 10 | 11 | EXTERNAL SOURCES: 12 | Flutter: 13 | :path: Flutter 14 | shared_preferences_foundation: 15 | :path: ".symlinks/plugins/shared_preferences_foundation/darwin" 16 | 17 | SPEC CHECKSUMS: 18 | Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 19 | shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 20 | 21 | PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011 22 | 23 | COCOAPODS: 1.15.2 24 | -------------------------------------------------------------------------------- /device_preview/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /device_preview/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /device_preview/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /device_preview/example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /device_preview/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /device_preview/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /device_preview/example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /device_preview/example/lib/custom_plugin.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_preview/device_preview.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class CustomPlugin extends StatelessWidget { 5 | const CustomPlugin({ 6 | Key? key, 7 | }) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return ToolPanelSection( 12 | title: 'Custom', 13 | children: [ 14 | ListTile( 15 | title: const Text('Print in console'), 16 | onTap: () { 17 | // ignore: avoid_print 18 | print('Hey, this is a custom plugin!'); 19 | }, 20 | ) 21 | ], 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /device_preview/example/lib/generated_plugin_registrant.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // ignore_for_file: directives_ordering 6 | // ignore_for_file: lines_longer_than_80_chars 7 | // ignore_for_file: depend_on_referenced_packages 8 | 9 | import 'package:shared_preferences_web/shared_preferences_web.dart'; 10 | 11 | import 'package:flutter_web_plugins/flutter_web_plugins.dart'; 12 | 13 | // ignore: public_member_api_docs 14 | void registerPlugins(Registrar registrar) { 15 | SharedPreferencesPlugin.registerWith(registrar); 16 | registrar.registerMessageHandler(); 17 | } 18 | -------------------------------------------------------------------------------- /device_preview/example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_preview/device_preview.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | import 'basic.dart'; 6 | import 'custom_plugin.dart'; 7 | 8 | void main() { 9 | runApp( 10 | DevicePreview( 11 | enabled: true, 12 | tools: const [ 13 | ...DevicePreview.defaultTools, 14 | CustomPlugin(), 15 | ], 16 | builder: (context) => const BasicApp(), 17 | ), 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /device_preview/example/linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /device_preview/example/linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | 10 | void fl_register_plugins(FlPluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /device_preview/example/linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /device_preview/example/linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /device_preview/example/linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /device_preview/example/linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /device_preview/example/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /device_preview/example/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /device_preview/example/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /device_preview/example/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import shared_preferences_foundation 9 | 10 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 11 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) 12 | } 13 | -------------------------------------------------------------------------------- /device_preview/example/macos/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FlutterMacOS (1.0.0) 3 | - shared_preferences_macos (0.0.1): 4 | - FlutterMacOS 5 | 6 | DEPENDENCIES: 7 | - FlutterMacOS (from `Flutter/ephemeral`) 8 | - shared_preferences_macos (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos`) 9 | 10 | EXTERNAL SOURCES: 11 | FlutterMacOS: 12 | :path: Flutter/ephemeral 13 | shared_preferences_macos: 14 | :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos 15 | 16 | SPEC CHECKSUMS: 17 | FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424 18 | shared_preferences_macos: a64dc611287ed6cbe28fd1297898db1336975727 19 | 20 | PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c 21 | 22 | COCOAPODS: 1.11.3 23 | -------------------------------------------------------------------------------- /device_preview/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /device_preview/example/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /device_preview/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /device_preview/example/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /device_preview/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /device_preview/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /device_preview/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /device_preview/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /device_preview/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /device_preview/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /device_preview/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /device_preview/example/macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = example 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /device_preview/example/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /device_preview/example/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /device_preview/example/macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /device_preview/example/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /device_preview/example/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /device_preview/example/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /device_preview/example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/web/favicon.png -------------------------------------------------------------------------------- /device_preview/example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /device_preview/example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /device_preview/example/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /device_preview/example/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /device_preview/example/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "short_name": "example", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /device_preview/example/windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /device_preview/example/windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | 10 | void RegisterPlugins(flutter::PluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /device_preview/example/windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /device_preview/example/windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /device_preview/example/windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /device_preview/example/windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/example/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /device_preview/example/windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /device_preview/example/windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /device_preview/firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "example/build/web", 4 | "ignore": [ 5 | "firebase.json", 6 | "**/.*", 7 | "**/node_modules/**" 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /device_preview/lib/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/device_preview/lib/.DS_Store -------------------------------------------------------------------------------- /device_preview/lib/device_preview.dart: -------------------------------------------------------------------------------- 1 | export 'package:device_frame/device_frame.dart'; 2 | 3 | export 'src/device_preview.dart'; 4 | 5 | export 'src/state/state.dart'; 6 | export 'src/state/store.dart'; 7 | 8 | export 'src/storage/file/file.dart'; 9 | export 'src/storage/preferences/preferences.dart'; 10 | export 'src/storage/storage.dart'; 11 | 12 | export 'src/locales/locales.dart'; 13 | export 'src/locales/default_locales.dart'; 14 | 15 | export 'src/utilities/screenshot.dart'; 16 | 17 | export 'src/views/tool_panel/sections/accessibility.dart'; 18 | export 'src/views/tool_panel/sections/device.dart'; 19 | export 'src/views/tool_panel/sections/section.dart'; 20 | export 'src/views/tool_panel/sections/settings.dart'; 21 | export 'src/views/tool_panel/sections/system.dart'; 22 | -------------------------------------------------------------------------------- /device_preview/lib/src/storage/file/file.dart: -------------------------------------------------------------------------------- 1 | export 'file_mock.dart' 2 | if (dart.library.html) 'file_web.dart' 3 | if (dart.library.io) 'file_io.dart'; 4 | -------------------------------------------------------------------------------- /device_preview/lib/src/storage/file/file_mock.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_preview/src/state/state.dart'; 2 | 3 | import '../storage.dart'; 4 | 5 | /// A storage that saves device preview user preferences into 6 | /// a single [file] as json content. 7 | class FileDevicePreviewStorage extends DevicePreviewStorage { 8 | FileDevicePreviewStorage({ 9 | required this.filePath, 10 | }); 11 | 12 | /// The file to which the json content is saved to. 13 | final String filePath; 14 | 15 | @override 16 | Future load() => Future.value(null); 17 | 18 | @override 19 | Future save(DevicePreviewData data) => Future.value(); 20 | } 21 | -------------------------------------------------------------------------------- /device_preview/lib/src/storage/file/file_web.dart: -------------------------------------------------------------------------------- 1 | import 'dart:developer'; 2 | 3 | import 'package:device_preview/src/state/state.dart'; 4 | 5 | import '../storage.dart'; 6 | 7 | /// This storage isn't supported when targeting web platform. 8 | /// 9 | /// The preferences won't be persisted between session when using this storage. 10 | class FileDevicePreviewStorage extends DevicePreviewStorage { 11 | FileDevicePreviewStorage({ 12 | required this.filePath, 13 | }); 14 | 15 | /// The file to which the json content is saved to. 16 | final String filePath; 17 | 18 | @override 19 | Future load() { 20 | log('WARNING: FileDevicePreviewStorage isn\'t supported on web. The settings won\'t be persisted.'); 21 | return Future.value(null); 22 | } 23 | 24 | @override 25 | Future save(DevicePreviewData data) { 26 | log('WARNING: FileDevicePreviewStorage isn\'t supported on web. The settings won\'t be persisted.'); 27 | return Future.value(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /device_preview/lib/src/storage/preferences/preferences.dart: -------------------------------------------------------------------------------- 1 | export 'preferences_mock.dart' 2 | if (dart.library.html) 'preferences_web.dart' 3 | if (dart.library.io) 'preferences_io.dart'; 4 | -------------------------------------------------------------------------------- /device_preview/lib/src/storage/preferences/preferences_mock.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_preview/src/state/state.dart'; 2 | 3 | import '../storage.dart'; 4 | 5 | /// Since share_preferences makes pub considering the package as not supported we should 6 | /// remove this functionnality from the web version to get the maximum score. 7 | class PreferencesDevicePreviewStorage extends DevicePreviewStorage { 8 | PreferencesDevicePreviewStorage({ 9 | this.preferenceKey = defaultPreferencesKey, 10 | }); 11 | 12 | /// The preferences key used to save the user configuration. 13 | final String preferenceKey; 14 | 15 | /// The default preferences key used to save the user configuration. 16 | static const String defaultPreferencesKey = 'device_preview.settings'; 17 | 18 | @override 19 | Future load() => Future.value(null); 20 | 21 | @override 22 | Future save(DevicePreviewData data) => Future.value(); 23 | } 24 | -------------------------------------------------------------------------------- /device_preview/lib/src/utilities/screenshot.dart: -------------------------------------------------------------------------------- 1 | import 'dart:typed_data'; 2 | import 'dart:ui' as ui; 3 | 4 | import 'package:device_frame/device_frame.dart'; 5 | 6 | /// A screenshot from a preview. 7 | class DeviceScreenshot { 8 | /// Creates a new preview screenshot with its associated [bytes] data, encoded with 9 | /// the given image [format] for the current [device] preview. 10 | const DeviceScreenshot({ 11 | required this.device, 12 | required this.bytes, 13 | required this.format, 14 | }); 15 | 16 | /// The device from which the screenshot was taken from. 17 | final DeviceInfo device; 18 | 19 | /// The binary content of the resulting image file. 20 | final Uint8List bytes; 21 | 22 | /// The format in which image bytes should be returned when using. 23 | final ui.ImageByteFormat format; 24 | } 25 | -------------------------------------------------------------------------------- /device_preview/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: device_preview 2 | version: 1.2.0 3 | description: Approximate how your Flutter app looks and performs on another device. 4 | homepage: https://github.com/aloisdeniel/flutter_device_preview 5 | 6 | environment: 7 | sdk: '>=3.3.0-0 <4.0.0' 8 | flutter: ">=3.22.0" 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | flutter_localizations: 13 | sdk: flutter 14 | provider: ^6.1.2 15 | device_frame: ^1.2.0 16 | freezed_annotation: ^2.4.1 17 | json_annotation: ^4.9.0 18 | shared_preferences: ^2.2.3 19 | collection: ^1.18.0 20 | 21 | dev_dependencies: 22 | flutter_test: 23 | sdk: flutter 24 | flutter_lints: ^4.0.0 25 | build_runner: ^2.4.0 26 | # freezed: ^2.5.3 27 | json_serializable: ^6.8.0 28 | -------------------------------------------------------------------------------- /devtools_device_preview/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 18116933e77adc82f80866c928266a5b4f1ed645 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /devtools_device_preview/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Devtools plugin Example", 9 | "request": "launch", 10 | "type": "dart", 11 | "program": "example/lib/main.dart" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /devtools_device_preview/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /devtools_device_preview/LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | -------------------------------------------------------------------------------- /devtools_device_preview/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | # Additional information about this file can be found at 4 | # https://dart.dev/guides/language/analysis-options 5 | -------------------------------------------------------------------------------- /devtools_device_preview/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /devtools_device_preview/example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 18116933e77adc82f80866c928266a5b4f1ed645 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /devtools_device_preview/example/README.md: -------------------------------------------------------------------------------- 1 | # example 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /devtools_device_preview/example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /devtools_device_preview/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /devtools_device_preview/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /devtools_device_preview/example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /devtools_device_preview/example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /devtools_device_preview/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /devtools_device_preview/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /devtools_device_preview/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /devtools_device_preview/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /devtools_device_preview/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /devtools_device_preview/example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /devtools_device_preview/example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /devtools_device_preview/example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /devtools_device_preview/example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /devtools_device_preview/example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /devtools_device_preview/example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /devtools_device_preview/example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/web/favicon.png -------------------------------------------------------------------------------- /devtools_device_preview/example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /devtools_device_preview/example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /devtools_device_preview/example/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /devtools_device_preview/example/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/devtools_device_preview/example/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /devtools_device_preview/lib/devtools_device_preview.dart: -------------------------------------------------------------------------------- 1 | library devtools_device_preview; 2 | 3 | export 'src/tools.dart'; 4 | 5 | export 'package:device_frame/device_frame.dart'; 6 | -------------------------------------------------------------------------------- /docs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/docs/.DS_Store -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | ## Main features 2 | 3 | * Preview any device from any device 4 | * Change the device orientation 5 | * Dynamic system configuration (*language, dark mode, text scaling factor, ...)* 6 | * Freeform device with adjustable resolution and safe areas 7 | * Keep the application state 8 | * Plugin system (*Screenshot, custom...* ) 9 | 10 | # Demo 11 | 12 |
13 | 15 |
16 | 17 | Open 18 | 19 | ## Limitations 20 | 21 | Think of Device Preview as a first-order approximation of how your app looks and feels on a mobile device. With Device Mode you don't actually run your code on a mobile device. You simulate the mobile user experience from your laptop, desktop or tablet. 22 | 23 | !> There are some aspects of mobile devices that Device Preview will never be able to simulate. When in doubt, your best bet is to actually run your app on a real device. -------------------------------------------------------------------------------- /docs/_coverpage.md: -------------------------------------------------------------------------------- 1 | 2 | ![Github](./images/logo.png ':size=500') 3 | 4 | Approximate how your Flutter app looks and performs on another device. 5 | 6 | 14 | 15 |
16 |
17 | 18 | 19 | 20 | ![](images/cover.png) -------------------------------------------------------------------------------- /docs/_sidebar.md: -------------------------------------------------------------------------------- 1 | - Usage 2 | - [Install](content/usage/install.md) 3 | - [Options](content/usage/options.md) 4 | - [Manual](content/usage/tools.md) 5 | - [Only frames](content/usage/device_frame.md) 6 | 7 | - Plugins 8 | - [Screenshot](content/plugins/screenshot.md) 9 | - [Build your own plugin](content/plugins/custom.md) 10 | 11 | - Contributing 12 | - [Device proposal](content/contributing/device_proposal.md) 13 | - [Other](content/contributing/other.md) 14 | -------------------------------------------------------------------------------- /docs/content/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/docs/content/.DS_Store -------------------------------------------------------------------------------- /docs/content/contributing/device_proposal.md: -------------------------------------------------------------------------------- 1 | # New device proposal 2 | 3 | ## Design files 4 | 5 | All devices must be added as dedicated frames in the [offical Figma file](https://www.figma.com/file/WIamxcVDlHvxcCjLvJnwmR/DevicePreview---Frames?node-id=0%3A1). 6 | 7 | Each device frame mush have a `Screen` node which must contains a flatten shape, and a `Body` group which contains the device body elements. 8 | 9 | ## Generate painter code 10 | 11 | All the custom painter code is generated with [fluttershapemaker](https://fluttershapemaker.com/) and is then manually improved. 12 | 13 | # Send a pull request 14 | 15 | Once your design is ready, create [a new pull request](https://github.com/aloisdeniel/flutter_device_preview/pulls) with your files added to the `device_frame/lib/src/devices/` directory. -------------------------------------------------------------------------------- /docs/content/contributing/other.md: -------------------------------------------------------------------------------- 1 | # Other contributions 2 | 3 | ## Thanks 4 | 5 | We're very grateful to have the help of those users : 6 | 7 | * [Mike Rydstrom](https://rydmike.com/) who helped a lot with beta testing and gave us a lot of feedback! 8 | * [Fun with Flutter](https://www.youtube.com/c/FunwithFlutter/) who created [an awesome introduction video for the tool](https://www.youtube.com/watch?v=ObD6Jgvc71k)! 9 | * [Pooja Bhaumik](https://twitter.com/pblead26) who also created a [great video]((https://www.youtube.com/watch?v=0B0cSbKSThI)) mentionning Device Preview! 10 | 11 | ## Donate 12 | 13 |

14 | 15 | 16 | 17 |

18 | 19 | If you love Device Preview, don't hesitate to donate a few bucks! It will help us to keep motivation at its best! -------------------------------------------------------------------------------- /docs/content/plugins/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/docs/content/plugins/.DS_Store -------------------------------------------------------------------------------- /docs/content/plugins/images/custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/docs/content/plugins/images/custom.png -------------------------------------------------------------------------------- /docs/content/plugins/images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/docs/content/plugins/images/screenshot.png -------------------------------------------------------------------------------- /docs/content/usage/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/docs/content/usage/.DS_Store -------------------------------------------------------------------------------- /docs/content/usage/device_frame.md: -------------------------------------------------------------------------------- 1 | # Only frames as widgets 2 | 3 | The [device_frame](https://pub.dev/packages/device_frame) package allows to include only one of the devices frames as a widget in your application, without all the tools around. 4 | 5 | ## Install 6 | 7 | ```yaml 8 | dependencies: 9 | device_frame: 10 | ``` 11 | 12 | ## Usage 13 | 14 | ```dart 15 | import 'package:device_frame/device_frame.dart'; 16 | 17 | DeviceFrame( 18 | device: IosDevices.iPhone11, 19 | screen: YourScreen(), 20 | ), 21 | ``` -------------------------------------------------------------------------------- /docs/content/usage/images/manual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/docs/content/usage/images/manual.png -------------------------------------------------------------------------------- /docs/content/usage/tools.md: -------------------------------------------------------------------------------- 1 | # Manual 2 | 3 | Here is a quick preview of the tools available from the Device Preview's toolbar. 4 | 5 | ![manual_preview](images/manual.png ':size=740') -------------------------------------------------------------------------------- /docs/images/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/docs/images/cover.png -------------------------------------------------------------------------------- /docs/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/docs/images/logo.png -------------------------------------------------------------------------------- /docs/images/pub_logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/logo.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 18116933e77adc82f80866c928266a5b4f1ed645 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "DevicePreviewScreenshot Example", 9 | "request": "launch", 10 | "type": "dart", 11 | "program": "example/lib/main.dart" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.0.0-alpha.4 2 | 3 | * Updated `device_preview dependency`. 4 | 5 | ## 1.0.0-alpha.3 6 | 7 | * Updated `device_preview dependency`. 8 | 9 | ## 1.0.0-alpha.2 10 | 11 | * Updated `device_preview dependency`. 12 | 13 | ## 1.0.0-alpha.1 14 | 15 | * Initial release. 16 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | # Additional information about this file can be found at 4 | # https://dart.dev/guides/language/analysis-options 5 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 18116933e77adc82f80866c928266a5b4f1ed645 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/README.md: -------------------------------------------------------------------------------- 1 | # example 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - shared_preferences (0.0.1): 4 | - Flutter 5 | 6 | DEPENDENCIES: 7 | - Flutter (from `Flutter`) 8 | - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) 9 | 10 | EXTERNAL SOURCES: 11 | Flutter: 12 | :path: Flutter 13 | shared_preferences: 14 | :path: ".symlinks/plugins/shared_preferences/ios" 15 | 16 | SPEC CHECKSUMS: 17 | Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a 18 | shared_preferences: 5033afbb22d372e15aff8ff766df9021b845f273 19 | 20 | PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c 21 | 22 | COCOAPODS: 1.11.2 23 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import shared_preferences_foundation 9 | 10 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 11 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) 12 | } 13 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FlutterMacOS (1.0.0) 3 | - shared_preferences_macos (0.0.1): 4 | - FlutterMacOS 5 | 6 | DEPENDENCIES: 7 | - FlutterMacOS (from `Flutter/ephemeral`) 8 | - shared_preferences_macos (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos`) 9 | 10 | EXTERNAL SOURCES: 11 | FlutterMacOS: 12 | :path: Flutter/ephemeral 13 | shared_preferences_macos: 14 | :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos 15 | 16 | SPEC CHECKSUMS: 17 | FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424 18 | shared_preferences_macos: 480ce071d0666e37cef23fe6c702293a3d21799e 19 | 20 | PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c 21 | 22 | COCOAPODS: 1.11.2 23 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = example 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2021 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/web/favicon.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/example/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aloisdeniel/flutter_device_preview/9cd7405bee4eb9d52be3633cf0887206a298e6fc/plugins/device_preview_screenshot/example/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/lib/device_preview_screenshot.dart: -------------------------------------------------------------------------------- 1 | library device_preview_screenshot; 2 | 3 | export 'package:device_preview/device_preview.dart'; 4 | 5 | export 'src/processors/base64.dart'; 6 | export 'src/processors/file.dart'; 7 | export 'src/processors/processor.dart'; 8 | 9 | export 'src/section.dart'; 10 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/lib/src/processors/base64.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:developer'; 3 | 4 | import 'package:device_preview/device_preview.dart'; 5 | import 'package:flutter/services.dart'; 6 | import 'package:flutter/widgets.dart'; 7 | 8 | /// Prints screenshot in the console as base 64 strings. 9 | /// 10 | /// The image can then be decoded with tools like [this one](https://codebeautify.org/base64-to-image-converter). 11 | Future screenshotAsBase64( 12 | BuildContext context, 13 | DeviceScreenshot screenshot, 14 | ) async { 15 | var result = base64.encode(screenshot.bytes); 16 | final timestamp = DateTime.now().millisecondsSinceEpoch; 17 | log('Screenshot ${screenshot.device.identifier} $timestamp (also in clipboard) -> $result'); 18 | await Clipboard.setData( 19 | ClipboardData(text: result), 20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/lib/src/processors/file.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'dart:ui'; 3 | 4 | import 'package:path/path.dart'; 5 | 6 | import 'processor.dart'; 7 | 8 | /// Saves the received screenshots to the given [directory]. 9 | /// 10 | /// The output file image format is `_.`. 11 | ScreenshotProcessor screenshotAsFiles(Directory directory) { 12 | return (context, screenshot) async { 13 | final timestamp = DateTime.now().millisecondsSinceEpoch; 14 | final extension = () { 15 | switch (screenshot.format) { 16 | case ImageByteFormat.png: 17 | return '.png'; 18 | case ImageByteFormat.rawUnmodified: 19 | case ImageByteFormat.rawRgba: 20 | return '.bmp'; 21 | } 22 | }(); 23 | final file = File( 24 | join( 25 | directory.path, 26 | '${screenshot.device.identifier}_$timestamp$extension', 27 | ), 28 | ); 29 | 30 | await file.writeAsBytes(screenshot.bytes); 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/lib/src/processors/processor.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_preview/device_preview.dart'; 2 | import 'package:flutter/widgets.dart'; 3 | 4 | typedef ScreenshotProcessor = Future Function( 5 | BuildContext context, 6 | DeviceScreenshot screenshot, 7 | ); 8 | -------------------------------------------------------------------------------- /plugins/device_preview_screenshot/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: device_preview_screenshot 2 | version: 1.0.0 3 | description: A plugin for device_preview that allows to take screenshots. 4 | homepage: https://github.com/aloisdeniel/flutter_device_preview/plugins/device_preview_screenshot 5 | 6 | environment: 7 | sdk: ">=2.12.0 <3.0.0" 8 | flutter: ">=1.17.0" 9 | 10 | dependencies: 11 | device_preview: ^1.0.0 12 | flutter: 13 | sdk: flutter 14 | path: ^1.8.0 15 | 16 | dev_dependencies: 17 | flutter_test: 18 | sdk: flutter 19 | flutter_lints: ^1.0.4 20 | --------------------------------------------------------------------------------