├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── docs └── readme │ └── header.png ├── lib ├── device_sizes.dart └── src │ ├── _device.dart │ ├── apple │ ├── _ios.dart │ ├── _ipads.dart │ └── _iphones.dart │ ├── google │ └── _phones.dart │ └── samsung │ └── _phones.dart └── pubspec.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | 3 | ### https://raw.github.com/github/gitignore/80a8803b004013d17291196825a327b9e871f009/Android.gitignore 4 | 5 | # Built application files 6 | *.apk 7 | *.ap_ 8 | 9 | # Files for the ART/Dalvik VM 10 | *.dex 11 | 12 | # Java class files 13 | *.class 14 | 15 | # Generated files 16 | bin/ 17 | gen/ 18 | out/ 19 | 20 | # Gradle files 21 | .gradle/ 22 | build/ 23 | 24 | # Local configuration file (sdk path, etc) 25 | local.properties 26 | 27 | # Proguard folder generated by Eclipse 28 | proguard/ 29 | 30 | # Log Files 31 | *.log 32 | 33 | # Android Studio Navigation editor temp files 34 | .navigation/ 35 | 36 | # Android Studio captures folder 37 | captures/ 38 | 39 | # IntelliJ 40 | *.iml 41 | .idea/workspace.xml 42 | .idea/tasks.xml 43 | .idea/gradle.xml 44 | .idea/assetWizardSettings.xml 45 | .idea/dictionaries 46 | .idea/libraries 47 | .idea/caches 48 | 49 | # Keystore files 50 | # Uncomment the following line if you do not want to check your keystore files in. 51 | #*.jks 52 | 53 | # External native build folder generated in Android Studio 2.2 and later 54 | .externalNativeBuild 55 | 56 | # Google Services (e.g. APIs or Firebase) 57 | google-services.json 58 | 59 | # Freeline 60 | freeline.py 61 | freeline/ 62 | freeline_project_description.json 63 | 64 | # fastlane 65 | fastlane/report.xml 66 | fastlane/Preview.html 67 | fastlane/screenshots 68 | fastlane/test_output 69 | fastlane/readme.md 70 | 71 | 72 | ### https://raw.github.com/github/gitignore/80a8803b004013d17291196825a327b9e871f009/Dart.gitignore 73 | 74 | # See https://www.dartlang.org/guides/libraries/private-files 75 | 76 | # Files and directories created by pub 77 | .dart_tool/ 78 | .packages 79 | .pub/ 80 | build/ 81 | # If you're building an application, you may want to check-in your pubspec.lock 82 | pubspec.lock 83 | 84 | # Directory created by dartdoc 85 | # If you don't generate documentation locally you can remove this line. 86 | doc/api/ 87 | 88 | 89 | ### https://raw.github.com/github/gitignore/80a8803b004013d17291196825a327b9e871f009/Global/Linux.gitignore 90 | 91 | *~ 92 | 93 | # temporary files which can be created if a process still has a handle open of a deleted file 94 | .fuse_hidden* 95 | 96 | # KDE directory preferences 97 | .directory 98 | 99 | # Linux trash folder which might appear on any partition or disk 100 | .Trash-* 101 | 102 | # .nfs files are created when an open file is removed but is still being accessed 103 | .nfs* 104 | 105 | 106 | ### https://raw.github.com/github/gitignore/80a8803b004013d17291196825a327b9e871f009/Global/JetBrains.gitignore 107 | 108 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm 109 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 110 | 111 | # User-specific stuff 112 | .idea/**/workspace.xml 113 | .idea/**/tasks.xml 114 | .idea/**/dictionaries 115 | .idea/**/shelf 116 | 117 | # Sensitive or high-churn files 118 | .idea/**/dataSources/ 119 | .idea/**/dataSources.ids 120 | .idea/**/dataSources.local.xml 121 | .idea/**/sqlDataSources.xml 122 | .idea/**/dynamic.xml 123 | .idea/**/uiDesigner.xml 124 | .idea/**/dbnavigator.xml 125 | 126 | # Gradle 127 | .idea/**/gradle.xml 128 | .idea/**/libraries 129 | 130 | # CMake 131 | cmake-build-debug/ 132 | cmake-build-release/ 133 | 134 | # Mongo Explorer plugin 135 | .idea/**/mongoSettings.xml 136 | 137 | # File-based project format 138 | *.iws 139 | 140 | # IntelliJ 141 | out/ 142 | 143 | # mpeltonen/sbt-idea plugin 144 | .idea_modules/ 145 | 146 | # JIRA plugin 147 | atlassian-ide-plugin.xml 148 | 149 | # Cursive Clojure plugin 150 | .idea/replstate.xml 151 | 152 | # Crashlytics plugin (for Android Studio and IntelliJ) 153 | com_crashlytics_export_strings.xml 154 | crashlytics.properties 155 | crashlytics-build.properties 156 | fabric.properties 157 | 158 | # Editor-based Rest Client 159 | .idea/httpRequests 160 | 161 | 162 | ### https://raw.github.com/github/gitignore/80a8803b004013d17291196825a327b9e871f009/Global/macOS.gitignore 163 | 164 | # General 165 | .DS_Store 166 | .AppleDouble 167 | .LSOverride 168 | 169 | # Icon must end with two \r 170 | Icon 171 | 172 | 173 | # Thumbnails 174 | ._* 175 | 176 | # Files that might appear in the root of a volume 177 | .DocumentRevisions-V100 178 | .fseventsd 179 | .Spotlight-V100 180 | .TemporaryItems 181 | .Trashes 182 | .VolumeIcon.icns 183 | .com.apple.timemachine.donotpresent 184 | 185 | # Directories potentially created on remote AFP share 186 | .AppleDB 187 | .AppleDesktop 188 | Network Trash Folder 189 | Temporary Items 190 | .apdisk 191 | 192 | 193 | ### https://raw.github.com/github/gitignore/80a8803b004013d17291196825a327b9e871f009/Global/Vim.gitignore 194 | 195 | # Swap 196 | [._]*.s[a-v][a-z] 197 | [._]*.sw[a-p] 198 | [._]s[a-v][a-z] 199 | [._]sw[a-p] 200 | 201 | # Session 202 | Session.vim 203 | 204 | # Temporary 205 | .netrwhist 206 | *~ 207 | # Auto-generated tag files 208 | tags 209 | # Persistent undo 210 | [._]*.un~ 211 | 212 | 213 | ### https://raw.github.com/github/gitignore/80a8803b004013d17291196825a327b9e871f009/Global/Xcode.gitignore 214 | 215 | # Xcode 216 | # 217 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 218 | 219 | ## User settings 220 | xcuserdata/ 221 | 222 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 223 | *.xcscmblueprint 224 | *.xccheckout 225 | 226 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 227 | build/ 228 | DerivedData/ 229 | *.moved-aside 230 | *.pbxuser 231 | !default.pbxuser 232 | *.mode1v3 233 | !default.mode1v3 234 | *.mode2v3 235 | !default.mode2v3 236 | *.perspectivev3 237 | !default.perspectivev3 238 | 239 | 240 | ### https://raw.github.com/github/gitignore/80a8803b004013d17291196825a327b9e871f009/Global/VisualStudioCode.gitignore 241 | 242 | .vscode/* 243 | !.vscode/settings.json 244 | !.vscode/tasks.json 245 | !.vscode/launch.json 246 | !.vscode/extensions.json 247 | 248 | 249 | ## Custom 250 | # Google API key and other resources 251 | GoogleService-Info.plist 252 | google-services.json 253 | # Plugins (already resolved through pubspec.yaml) 254 | .flutter-plugins -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING 2 | Please follow the processes in this document to file issues and contribute work. 3 | 4 | ## File Bugs 5 | When you file a bug, please include *at least* the following details: 6 | 7 | * description of the problem 8 | * the version of the package that you're using 9 | * output from `flutter doctor` or your current Dart version 10 | * minimum code needed to reproduce the issue 11 | 12 | ## File Feature Requests 13 | When you file a feature request, please explain *why* you need the given feature. 14 | 15 | The purpose of this package is extremely narrow. There is no guarantee that new capabilities will be added. 16 | 17 | ## Submit a Pull Request 18 | Every PR must have an associated issue. Please make sure to file an issue before working on a bug or feature. 19 | 20 | Please name your branch like `xxxx_summary-of-work`, where `xxxx` is the issue ticket number that you're working on. 21 | 22 | Please end your commit message with ` (Resolves #xxxx)`, where `xxxx` is the issue ticket number that you're working on. This practice causes the ticket to be closed upon merge. 23 | 24 | If you're adding new device sizes, please include a link in your PR to a webpage that verifies the screen details that you're adding. 25 | 26 | If you're working on a new feature, you should wait for initial feedback on your issue ticket to ensure that this package will accept that feature. 27 | 28 | All behavioral changes must include effective tests. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2021 Declarative Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![device_sizes header](docs/readme/header.png) 2 | 3 | # Device Sizes 4 | 5 | This package aggregates screen sizes and pixel densities for as many physical devices as possible. The purpose of this package is to help developers make decisions in their code based on common device form factors. 6 | 7 | Here are some examples of how device sizes might be used: 8 | 9 | * Choosing dimensions for golden tests 10 | * Choosing layout breakpoints for your app layout 11 | * Implementing graphics programs where the user might want a canvas the size of a typical device 12 | 13 | To report bugs, add more device sizes, or request new features, please see [CONTRIBUTING.md](CONTRIBUTING.md). 14 | -------------------------------------------------------------------------------- /docs/readme/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-carroll/device_sizes/b2cdd0015638ab52b80ea3eb298059347e597c08/docs/readme/header.png -------------------------------------------------------------------------------- /lib/device_sizes.dart: -------------------------------------------------------------------------------- 1 | export 'src/_device.dart'; 2 | export 'src/apple/_ios.dart'; 3 | export 'src/apple/_iphones.dart'; 4 | export 'src/apple/_ipads.dart'; 5 | export 'src/google/_phones.dart'; 6 | export 'src/samsung/_phones.dart'; 7 | -------------------------------------------------------------------------------- /lib/src/_device.dart: -------------------------------------------------------------------------------- 1 | /// Screen size metrics for a desktop or mobile device. 2 | class DeviceSize { 3 | const DeviceSize({ 4 | required this.name, 5 | required this.pixelResolution, 6 | required this.aspectRatio, 7 | required this.screenSize, 8 | required this.pixelDensity, 9 | }); 10 | 11 | /// Name of the device, e.g., "iPhone 12". 12 | final String name; 13 | 14 | /// The physical size of the screen, e.g., in inches. 15 | PhysicalSize get physicalSize => PhysicalSize( 16 | PhysicalDimension.inches(pixelResolution.width * pixelDensity), 17 | PhysicalDimension.inches(pixelResolution.height * pixelDensity), 18 | ); 19 | 20 | /// The pixel resolution of the screen, which measures the true 21 | /// number of pixels on the screen, e.g., 2532 x 1170 for the iPhone 12. 22 | final Size pixelResolution; 23 | 24 | /// The aspect ratio of the screen, defined as the screen width / height, 25 | /// with the width defined as the wider of the two dimensions. 26 | final AspectRatio aspectRatio; 27 | 28 | /// The distance between opposite corners of the device, measured physically, 29 | /// e.g., in inches. 30 | final PhysicalDimension screenSize; 31 | 32 | /// The number of pixels per inch. 33 | final num pixelDensity; 34 | } 35 | 36 | /// A two-dimensional size. 37 | class Size { 38 | const Size(this.width, this.height); 39 | 40 | /// The horizontal measure of this size. 41 | final num width; 42 | 43 | /// The vertical measure of this size. 44 | final num height; 45 | 46 | @override 47 | bool operator ==(Object other) => 48 | identical(this, other) || 49 | other is Size && runtimeType == other.runtimeType && width == other.width && height == other.height; 50 | 51 | @override 52 | int get hashCode => width.hashCode ^ height.hashCode; 53 | } 54 | 55 | /// A two-dimensional size, comprised of [PhysicalDimension]s. 56 | class PhysicalSize { 57 | const PhysicalSize( 58 | this.width, 59 | this.height, 60 | ); 61 | 62 | final PhysicalDimension width; 63 | final PhysicalDimension height; 64 | } 65 | 66 | /// A dimension that represents a real distance, e.g., inches or millimeters. 67 | class PhysicalDimension { 68 | static const mmPerInch = 25.4; 69 | 70 | const PhysicalDimension.inches(num inches) : _inches = inches; 71 | 72 | const PhysicalDimension.millimeters(num millimeters) : _inches = millimeters / mmPerInch; 73 | 74 | final num _inches; 75 | 76 | /// This dimension, measured in inches. 77 | num get inches => _inches; 78 | 79 | /// This dimension, measured in millimeters. 80 | num get millimeters => _inches * mmPerInch; 81 | 82 | @override 83 | String toString() => "PhysicalDimension: $inches in, $millimeters mm"; 84 | 85 | @override 86 | bool operator ==(Object other) => 87 | identical(this, other) || 88 | other is PhysicalDimension && runtimeType == other.runtimeType && _inches == other._inches; 89 | 90 | @override 91 | int get hashCode => _inches.hashCode; 92 | } 93 | 94 | /// Aspect ratio, represented as width:height, e.g., 16:9 for a common computer display. 95 | /// 96 | /// An aspect ratio is often represented as a `double` in code, however, screen 97 | /// specifications often describe aspect ratios in the `width:height` format. Therefore, 98 | /// this class is offered as a way to easily record aspect ratios in the format that 99 | /// they are publicly specified. 100 | class AspectRatio { 101 | const AspectRatio(this.width, this.height); 102 | 103 | /// The longer side of the aspect ratio. 104 | final num width; 105 | 106 | /// The shorter side of the aspect ratio. 107 | final num height; 108 | 109 | /// [width]/[height] 110 | num get toNum => width / height; 111 | } 112 | -------------------------------------------------------------------------------- /lib/src/apple/_ios.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_sizes/device_sizes.dart'; 2 | 3 | /// Screen size metrics for an iOS device. 4 | /// 5 | /// `iOSDeviceSize` adds [logicalResolution] and [renderScale] to the 6 | /// standard [DeviceSize] definition. 7 | class iOSDeviceSize extends DeviceSize { 8 | const iOSDeviceSize({ 9 | required String name, 10 | required Size pixelResolution, 11 | required AspectRatio aspectRatio, 12 | required this.renderScale, 13 | required PhysicalDimension screenSize, 14 | required num pixelDensity, 15 | }) : super( 16 | name: name, 17 | pixelResolution: pixelResolution, 18 | aspectRatio: aspectRatio, 19 | screenSize: screenSize, 20 | pixelDensity: pixelDensity, 21 | ); 22 | 23 | /// The logical resolution of the screen, which is measured as 24 | /// the [pixelResolution] / [renderScale]. 25 | /// 26 | /// For example, the iPhone 12 has a pixel resolution of 2532 x 1170 27 | /// at a render scale of 3x, leading to a logical resolution of 28 | /// 844 x 390. 29 | Size get logicalResolution => Size( 30 | pixelResolution.width / renderScale, 31 | pixelResolution.height / renderScale, 32 | ); 33 | 34 | /// The number of physical pixels per logical pixel. 35 | /// 36 | /// See [logicalResolution] and [pixelResolution]. 37 | final num renderScale; 38 | } 39 | -------------------------------------------------------------------------------- /lib/src/apple/_ipads.dart: -------------------------------------------------------------------------------- 1 | import 'package:device_sizes/src/apple/_ios.dart'; 2 | 3 | import '../_device.dart'; 4 | 5 | /// iPad device sizes defined from most recent to least recent. 6 | 7 | /// iPad Air 4 device size. 8 | const ipad_air_4 = iOSDeviceSize( 9 | name: "iPad Air 4", 10 | pixelResolution: Size(2360, 1640), 11 | aspectRatio: AspectRatio(23, 16), 12 | renderScale: 2, 13 | screenSize: PhysicalDimension.inches(10.9), 14 | pixelDensity: 264, 15 | ); 16 | 17 | /// iPad 10.2" device size. 18 | const ipad_10_2 = iOSDeviceSize( 19 | name: 'iPad 10.2"', 20 | pixelResolution: Size(2160, 1620), 21 | aspectRatio: AspectRatio(4, 3), 22 | renderScale: 2, 23 | screenSize: PhysicalDimension.inches(10.2), 24 | pixelDensity: 264, 25 | ); 26 | 27 | /// iPad Pro 12.9" device size. 28 | const ipad_pro_12_9 = iOSDeviceSize( 29 | name: 'iPad Pro 12.9"', 30 | pixelResolution: Size(2732, 2048), 31 | aspectRatio: AspectRatio(4, 3), 32 | renderScale: 2, 33 | screenSize: PhysicalDimension.inches(12.9), 34 | pixelDensity: 264, 35 | ); 36 | 37 | /// iPad Pro 11" device size. 38 | const ipad_pro_11 = iOSDeviceSize( 39 | name: 'iPad Pro 11"', 40 | pixelResolution: Size(2388, 1668), 41 | aspectRatio: AspectRatio(4, 3), 42 | renderScale: 2, 43 | screenSize: PhysicalDimension.inches(11), 44 | pixelDensity: 264, 45 | ); 46 | 47 | /// iPad Air 3 device size. 48 | const ipad_air_3 = iOSDeviceSize( 49 | name: 'iPad Air 3"', 50 | pixelResolution: Size(2224, 1668), 51 | aspectRatio: AspectRatio(4, 3), 52 | renderScale: 2, 53 | screenSize: PhysicalDimension.inches(10.5), 54 | pixelDensity: 264, 55 | ); 56 | -------------------------------------------------------------------------------- /lib/src/apple/_iphones.dart: -------------------------------------------------------------------------------- 1 | import '../_device.dart'; 2 | import '_ios.dart'; 3 | 4 | /// iPhone device sizes defined from most recent to least recent. 5 | 6 | /// iPhone 12 Pro Max device size. 7 | const iphone_12_pro_max = iOSDeviceSize( 8 | name: "iPhone 12 Pro Max", 9 | pixelResolution: Size(2778, 1284), 10 | aspectRatio: AspectRatio(19.5, 9), 11 | renderScale: 3, 12 | screenSize: PhysicalDimension.inches(6.7), 13 | pixelDensity: 458, 14 | ); 15 | 16 | /// iPhone 12 Pro device size. 17 | const iphone_12_pro = iOSDeviceSize( 18 | name: "iPhone 12 Pro", 19 | pixelResolution: Size(2532, 1170), 20 | aspectRatio: AspectRatio(19.5, 9), 21 | renderScale: 3, 22 | screenSize: PhysicalDimension.inches(6.1), 23 | pixelDensity: 466, 24 | ); 25 | 26 | /// iPhone 12 device size. 27 | const iphone_12 = iOSDeviceSize( 28 | name: "iPhone 12", 29 | pixelResolution: Size(2532, 1170), 30 | aspectRatio: AspectRatio(19.5, 9), 31 | renderScale: 3, 32 | screenSize: PhysicalDimension.inches(6.1), 33 | pixelDensity: 460, 34 | ); 35 | 36 | /// iPhone 12 Mini device size. 37 | const iphone_12_mini = iOSDeviceSize( 38 | name: "iPhone 12 Mini", 39 | pixelResolution: Size(2340, 1080), 40 | aspectRatio: AspectRatio(19.5, 9), 41 | renderScale: 3, 42 | screenSize: PhysicalDimension.inches(5.4), 43 | pixelDensity: 476, 44 | ); 45 | 46 | /// iPhone 11 Pro Max device size. 47 | const iphone_11_pro_max = iOSDeviceSize( 48 | name: "iPhone 11 Pro Max", 49 | pixelResolution: Size(2688, 1242), 50 | aspectRatio: AspectRatio(19.5, 9), 51 | renderScale: 3, 52 | screenSize: PhysicalDimension.inches(6.5), 53 | pixelDensity: 458, 54 | ); 55 | 56 | /// iPhone 11 Pro device size. 57 | const iphone_11_pro = iOSDeviceSize( 58 | name: "iPhone 11 Pro", 59 | pixelResolution: Size(2436, 1125), 60 | aspectRatio: AspectRatio(19.5, 9), 61 | renderScale: 3, 62 | screenSize: PhysicalDimension.inches(5.8), 63 | pixelDensity: 458, 64 | ); 65 | 66 | /// iPhone 11 device size. 67 | const iphone_11 = iOSDeviceSize( 68 | name: "iPhone 11", 69 | pixelResolution: Size(1792, 828), 70 | aspectRatio: AspectRatio(19.5, 9), 71 | renderScale: 3, 72 | screenSize: PhysicalDimension.inches(6.1), 73 | pixelDensity: 458, 74 | ); 75 | -------------------------------------------------------------------------------- /lib/src/google/_phones.dart: -------------------------------------------------------------------------------- 1 | import '../_device.dart'; 2 | 3 | /// Google phone device sizes defined from most recent to least recent. 4 | 5 | /// Google Pixel 6 Pro device size. 6 | const pixel_6_pro = DeviceSize( 7 | name: "Google Pixel 6 Pro", 8 | pixelResolution: Size(3120, 1440), 9 | aspectRatio: AspectRatio(19.5, 9), 10 | screenSize: PhysicalDimension.inches(6.7), 11 | pixelDensity: 512, 12 | ); 13 | 14 | /// Google Pixel 6 device size. 15 | const pixel_6 = DeviceSize( 16 | name: "Google Pixel 6", 17 | pixelResolution: Size(2400, 1080), 18 | aspectRatio: AspectRatio(20, 9), 19 | screenSize: PhysicalDimension.inches(6.4), 20 | pixelDensity: 411, 21 | ); 22 | 23 | /// Google Pixel 5a device size. 24 | const pixel_5a = DeviceSize( 25 | name: "Google Pixel 5a", 26 | pixelResolution: Size(2400, 1080), 27 | aspectRatio: AspectRatio(20, 9), 28 | screenSize: PhysicalDimension.inches(6.34), 29 | pixelDensity: 413, 30 | ); 31 | 32 | /// Google Pixel 4a device size. 33 | const pixel_4a = DeviceSize( 34 | name: "Google Pixel 4a", 35 | pixelResolution: Size(2340, 1080), 36 | aspectRatio: AspectRatio(19.5, 9), 37 | screenSize: PhysicalDimension.inches(5.8), 38 | pixelDensity: 443, 39 | ); 40 | -------------------------------------------------------------------------------- /lib/src/samsung/_phones.dart: -------------------------------------------------------------------------------- 1 | import '../_device.dart'; 2 | 3 | /// Samsung phone device sizes defined from most recent to least recent. 4 | 5 | /// Google Pixel 6 Pro device size. 6 | const galaxy_s20_fe = DeviceSize( 7 | name: "Samsung Galaxy S20 FE", 8 | pixelResolution: Size(2400, 1080), 9 | aspectRatio: AspectRatio(20, 9), 10 | screenSize: PhysicalDimension.inches(6.5), 11 | pixelDensity: 405, 12 | ); 13 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: device_sizes 2 | version: 0.0.1 3 | description: >- 4 | Collects screen sizes and pixel densities for real 5 | iPhones, iPads, Google phones, Samsung phones, and 6 | more. 7 | environment: 8 | sdk: '>=2.13.0 <3.0.0' 9 | 10 | dependencies: 11 | 12 | dev_dependencies: 13 | test: '>=1.15.0 <2.0.0' 14 | 15 | --------------------------------------------------------------------------------