diff --git a/device_frame/lib/src/devices/ios/devices.dart b/device_frame/lib/src/devices/ios/devices.dart index 650218c..2b9df71 100644 --- a/device_frame/lib/src/devices/ios/devices.dart +++ b/device_frame/lib/src/devices/ios/devices.dart @@ -28,6 +28,10 @@ import 'package:device_frame/src/devices/ios/iphone_16_pro/device.dart' as i_iphone_16_pro; import 'package:device_frame/src/devices/ios/iphone_16_pro_max/device.dart' as i_iphone_16_pro_max; +import 'package:device_frame/src/devices/ios/iphone_17_pro_max/device.dart' + as i_iphone_17_pro_max; +import 'package:device_frame/src/devices/ios/iphone_air/device.dart' + as i_iphone_air; import 'package:device_frame/src/devices/ios/ipad_air_4/device.dart' as i_ipad_air_4; import 'package:device_frame/src/devices/ios/ipad/device.dart' as i_ipad; @@ -60,6 +64,8 @@ class IosDevices { DeviceInfo get iPhone16Plus => i_iphone_16_plus.info; DeviceInfo get iPhone16Pro => i_iphone_16_pro.info; DeviceInfo get iPhone16ProMax => i_iphone_16_pro_max.info; + DeviceInfo get iPhone17ProMax => i_iphone_17_pro_max.info; + DeviceInfo get iPhoneAir => i_iphone_air.info; DeviceInfo get iPadAir4 => i_ipad_air_4.info; DeviceInfo get iPad => i_ipad.info; DeviceInfo get iPadPro11Inches => i_ipad_pro_11inches.info; @@ -85,7 +91,9 @@ class IosDevices { iPhone16Plus, iPhone16Pro, iPhone16ProMax, - //Tablets + iPhone17ProMax, + iPhoneAir, + // Tablets iPadAir4, iPad, iPadPro11Inches, diff --git a/device_frame/lib/src/devices/ios/iphone_17_pro_max/device.dart b/device_frame/lib/src/devices/ios/iphone_17_pro_max/device.dart new file mode 100644 index 0000000..1276492 --- /dev/null +++ b/device_frame/lib/src/devices/ios/iphone_17_pro_max/device.dart @@ -0,0 +1,33 @@ +import 'dart:ui' as ui; + +import 'package:device_frame/src/info/device_type.dart'; +import 'package:device_frame/src/info/identifier.dart'; +import 'package:device_frame/src/info/info.dart'; +import 'package:flutter/material.dart'; + +part 'frame.g.dart'; +part 'screen.g.dart'; + +final info = DeviceInfo( + identifier: const DeviceIdentifier( + TargetPlatform.iOS, + DeviceType.phone, + 'iphone-17-pro-max', + ), + name: 'iPhone 17 Pro Max', + pixelRatio: 3, + frameSize: const Size(873, 1800), + screenSize: const Size(440, 956), + safeAreas: const EdgeInsets.only( + top: 62, + bottom: 34, + ), + rotatedSafeAreas: const EdgeInsets.only( + left: 62, + right: 62, + top: 20, + bottom: 20, + ), + framePainter: const _FramePainter(), + screenPath: _screenPath, +); diff --git a/device_frame/lib/src/devices/ios/iphone_17_pro_max/frame.g.dart b/device_frame/lib/src/devices/ios/iphone_17_pro_max/frame.g.dart new file mode 100644 index 0000000..be604c9 --- /dev/null +++ b/device_frame/lib/src/devices/ios/iphone_17_pro_max/frame.g.dart @@ -0,0 +1,369 @@ +part of 'device.dart'; + +// Generated with https://fluttershapemaker.com and manually adjusted. +class _FramePainter extends CustomPainter { + const _FramePainter(); + + @override + void paint(Canvas canvas, Size size) { + final buttonsPath = Path() + ..moveTo(872.671, 563.658) + ..cubicTo(872.671, 562.578, 870.889, 561.703, 868.682, 561.703) + ..lineTo(862.035, 561.703) + ..lineTo(862.035, 770.2139999999999) + ..lineTo(868.682, 770.2139999999999) + ..cubicTo(870.889, 770.2139999999999, 872.671, 769.3389999999999, 872.671, + 768.2589999999999) + ..close() + ..moveTo(0.492, 516.151) + ..cubicTo(0.492, 515.457, 1.918, 514.895, 3.683, 514.895) + ..lineTo(9.001, 514.895) + ..lineTo(9.001, 648.937) + ..lineTo(3.683, 648.937) + ..cubicTo(1.918, 648.937, 0.4929999999999999, 648.375, 0.4929999999999999, + 647.6800000000001) + ..close() + ..moveTo(0.492, 373.09799999999996) + ..cubicTo(0.492, 372.679, 1.918, 372.34, 3.683, 372.34) + ..lineTo(9.001, 372.34) + ..lineTo(9.001, 453.191) + ..lineTo(3.683, 453.191) + ..cubicTo(1.918, 453.191, 0.4929999999999999, 452.852, 0.4929999999999999, + 452.433) + ..close() + ..moveTo(0.492, 686.362) + ..cubicTo(0.492, 685.668, 1.918, 685.105, 3.683, 685.105) + ..lineTo(9.001, 685.105) + ..lineTo(9.001, 819.148) + ..lineTo(3.683, 819.148) + ..cubicTo(1.918, 819.148, 0.4929999999999999, 818.585, 0.4929999999999999, + 817.8910000000001) + ..close(); + canvas.drawPath( + buttonsPath, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0xFFD55918), + ); + + final buttonsShadowPath = Path() + ..moveTo(862.035, 561.703) + ..lineTo(862.035, 770.2139999999999) + ..close() + ..moveTo(9.001, 514.895) + ..lineTo(9.001, 648.937) + ..close() + ..moveTo(9.001, 372.34) + ..lineTo(9.001, 453.191) + ..close() + ..moveTo(9.001, 685.105) + ..lineTo(9.001, 819.148) + ..close(); + canvas.drawPath( + buttonsShadowPath, + Paint() + ..color = Color(0xFFFFC78E) + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.0125 + ..maskFilter = MaskFilter.blur( + BlurStyle.inner, + size.width * 0.01, + ), + ); + + final backgroundPath = Path() + ..moveTo(6.874, 245.106) + ..cubicTo(6.874, 159.31099999999998, 6.874, 116.41299999999998, + 23.567999999999998, 83.644) + ..arcToPoint(Offset(90.502, 16.697000000000003), + radius: Radius.elliptical(153.18, 153.18), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(123.267, 0, 166.157, 0, 251.936, 0) + ..lineTo(619.102, 0) + ..cubicTo(704.88, 0, 747.77, 0, 780.533, 16.697) + ..arcToPoint(Offset(847.4680000000001, 83.644), + radius: Radius.elliptical(153.17, 153.17), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(864.162, 116.41300000000001, 864.162, 159.311, 864.162, 245.106) + ..lineTo(864.162, 1554.89) + ..cubicTo(864.162, 1640.69, 864.162, 1683.5900000000001, + 847.4680000000001, 1716.3600000000001) + ..arcToPoint(Offset(780.5330000000001, 1783.3000000000002), + radius: Radius.elliptical(153.15, 153.15), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(747.77, 1800, 704.88, 1800, 619.101, 1800) + ..lineTo(251.935, 1800) + ..cubicTo( + 166.156, 1800, 123.26599999999999, 1800, 90.50300000000001, 1783.3) + ..arcToPoint(Offset(23.568000000000012, 1716.36), + radius: Radius.elliptical(153.15, 153.15), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(6.874000000000013, 1683.59, 6.874000000000013, + 1640.6899999999998, 6.874000000000013, 1554.8899999999999) + ..close(); + canvas.drawPath( + backgroundPath, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0xFFD55918), + ); + + final antennasPath = Path() + ..moveTo(864.162, 1617.02) + ..lineTo(849.2710000000001, 1617.02) + ..lineTo(849.2710000000001, 1600) + ..lineTo(864.162, 1600) + ..close() + ..moveTo(864.162, 202.1289999999999) + ..lineTo(849.2710000000001, 202.1289999999999) + ..lineTo(849.2710000000001, 185.1079999999999) + ..lineTo(864.162, 185.1079999999999) + ..close() + ..moveTo(21.765, 1617.02) + ..lineTo(6.874, 1617.02) + ..lineTo(6.874, 1600) + ..lineTo(21.764, 1600) + ..close() + ..moveTo(21.765, 202.1289999999999) + ..lineTo(6.874, 202.1289999999999) + ..lineTo(6.874, 185.1079999999999) + ..lineTo(21.764, 185.1079999999999) + ..close(); + canvas.drawPath( + antennasPath, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0x40000000), + ); + + final bezelPath = Path() + ..moveTo(19.638, 237.446) + ..cubicTo(19.638, 158.801, 19.638, 119.478, 34.94, 89.439) + ..arcToPoint(Offset(96.297, 28.07099999999999), + radius: Radius.elliptical(140.4, 140.4), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(126.33, 12.765999999999991, 165.64600000000002, + 12.765999999999991, 244.277, 12.765999999999991) + ..lineTo(626.759, 12.765999999999991) + ..cubicTo(705.39, 12.765999999999991, 744.706, 12.765999999999991, + 774.739, 28.07099999999999) + ..arcToPoint(Offset(836.096, 89.439), + radius: Radius.elliptical(140.4, 140.4), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(851.398, 119.478, 851.398, 158.801, 851.398, 237.446) + ..lineTo(851.398, 1562.55) + ..cubicTo(851.398, 1641.2, 851.398, 1680.52, 836.096, 1710.56) + ..arcToPoint(Offset(774.739, 1771.9299999999998), + radius: Radius.elliptical(140.4, 140.4), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(744.706, 1787.2299999999998, 705.39, 1787.2299999999998, + 626.759, 1787.2299999999998) + ..lineTo(244.277, 1787.2299999999998) + ..cubicTo(165.646, 1787.2299999999998, 126.32999999999998, + 1787.2299999999998, 96.297, 1771.9299999999998) + ..arcToPoint(Offset(34.94, 1710.56), + radius: Radius.elliptical(140.4, 140.4), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(19.637999999999998, 1680.52, 19.637999999999998, 1641.2, + 19.637999999999998, 1562.55) + ..close(); + canvas + ..drawPath( + bezelPath, + Paint() + ..color = const Color(0xB3FFC78E) + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.01 + ..maskFilter = MaskFilter.blur( + BlurStyle.normal, + size.width * 0.004, + ), + ) + ..drawPath( + bezelPath, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0xFF000000), + ); + + final dynamicIslandPath = Path() + ..moveTo(523.459, 47.574) + ..lineTo(347.577, 47.574) + ..cubicTo(327.416, 47.574, 311.073, 63.292, 311.073, 82.681) + ..cubicTo(311.073, 102.07, 327.416, 117.787, 347.577, 117.787) + ..lineTo(523.4590000000001, 117.787) + ..cubicTo(543.6200000000001, 117.787, 559.9630000000001, 102.069, + 559.9630000000001, 82.68100000000001) + ..cubicTo(559.9630000000001, 63.29100000000001, 543.6200000000001, + 47.57400000000001, 523.4590000000001, 47.57400000000001) + ..close(); + canvas.drawPath( + dynamicIslandPath, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0xFF000000), + ); + + final cameraPath1 = Path() + ..moveTo(523.459, 93.213) + ..cubicTo(529.324, 93.213, 534.078, 88.63999999999999, 534.078, 83) + ..cubicTo(534.078, 77.36000000000001, 529.324, 72.787, 523.459, 72.787) + ..cubicTo(517.5939999999999, 72.787, 512.84, 77.359, 512.84, 83) + ..cubicTo(512.84, 88.641, 517.594, 93.213, 523.4590000000001, 93.213); + canvas.drawPath( + cameraPath1, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0xFF131423), + ); + + final cameraPath2 = Path() + ..moveTo(532.087, 83) + ..cubicTo(532.087, 78.417, 528.2239999999999, 74.702, 523.459, 74.702) + ..cubicTo( + 518.694, 74.702, 514.8309999999999, 78.417, 514.8309999999999, 83) + ..cubicTo(514.8309999999999, 87.582, 518.694, 91.298, 523.459, 91.298) + ..cubicTo( + 528.2239999999999, 91.298, 532.087, 87.58200000000001, 532.087, 83); + canvas.drawPath( + cameraPath2, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0xFF07144C), + ); + + final cameraPath3 = Path() + ..moveTo(516.181, 82.531) + ..cubicTo(516.321, 78.899, 519.634, 76.298, 523.414, 76.298) + ..cubicTo(527.234, 76.298, 530.5889999999999, 78.95, 530.7379999999999, + 82.62100000000001) + ..quadraticBezierTo(530.76, 83.14000000000001, 530.76, 83.638) + ..cubicTo(530.76, 83.968, 530.752, 84.31, 530.7379999999999, 84.655) + ..cubicTo(530.5889999999999, 88.32600000000001, 527.2339999999999, + 90.97800000000001, 523.414, 90.97800000000001) + ..cubicTo(519.634, 90.97800000000001, 516.321, 88.37800000000001, 516.181, + 84.745) + ..arcToPoint(Offset(516.181, 82.531), + radius: Radius.elliptical(27, 27), + rotation: 0, + largeArc: false, + clockwise: true); + canvas.drawPath( + cameraPath3, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0x66030303), + ); + + final cameraPath4 = Path() + ..moveTo(523.459, 89.702) + ..cubicTo(525.2919999999999, 89.702, 526.7779999999999, 88.416, + 526.7779999999999, 86.829) + ..cubicTo( + 526.7779999999999, 85.243, 525.2919999999999, 83.957, 523.459, 83.957) + ..cubicTo(521.626, 83.957, 520.141, 85.243, 520.141, 86.83) + ..cubicTo(520.141, 88.416, 521.626, 89.702, 523.459, 89.702); + ; + canvas.drawPath( + cameraPath4, + Paint() + ..style = PaintingStyle.fill + ..shader = ui.Gradient.linear( + Offset(size.width * 0.4988751, size.height * 0.03309667), + Offset(size.width * 0.4988751, size.height * 0.07210389), + const [Color(0x451D869C), Color(0x4C2371C6), Color(0x4C040AAD)], + const [0, 0.371, 1], + ), + ); + + final cameraPath5 = Path() + ..moveTo(523.459, 89.702) + ..cubicTo(524.559, 89.702, 525.4499999999999, 88.845, 525.4499999999999, + 87.78699999999999) + ..cubicTo(525.4499999999999, 86.72899999999998, 524.559, + 85.87199999999999, 523.459, 85.87199999999999) + ..cubicTo(522.3599999999999, 85.87199999999999, 521.468, + 86.72899999999998, 521.468, 87.78699999999999) + ..cubicTo(521.468, 88.845, 522.36, 89.702, 523.459, 89.702); + canvas.drawPath( + cameraPath5, + Paint() + ..style = PaintingStyle.fill + ..shader = ui.Gradient.linear( + Offset(size.width * 0.4988751, size.height * 0.03634722), + Offset(size.width * 0.4988751, size.height * 0.07210389), + const [Color(0x59005267), Color(0x59415967), Color(0x598700C7)], + const [0, 0.486, 1], + ), + ); + + final cameraPath6 = Path() + ..moveTo(523.459, 88.106) + ..cubicTo(526.3919999999999, 88.106, 528.7689999999999, 85.82, + 528.7689999999999, 83) + ..cubicTo( + 528.7689999999999, 80.18, 526.3919999999999, 77.893, 523.459, 77.893) + ..cubicTo(520.526, 77.893, 518.15, 80.18, 518.15, 83) + ..cubicTo(518.15, 85.82, 520.5269999999999, 88.106, 523.459, 88.106); + canvas.drawPath( + cameraPath6, + Paint() + ..style = PaintingStyle.fill + ..shader = ui.Gradient.linear( + Offset(size.width * 0.5996094, size.height * 0.04309667), + Offset(size.width * 0.5996094, size.height * 0.04575667), + const [Color(0xFF5978DD), Color(0x9C312FAD), Color(0x001C1C86)], + const [0, 0.379, 1], + ), + ); + + final speakerPath = Path() + ..moveTo(603.245, 15.266) + ..cubicTo(602.132, 15.693, 601.135, 16.249, 600.317, 16.922) + ..lineTo(597.9830000000001, 18.841) + ..cubicTo( + 596.624, 19.957, 594.4330000000001, 20.648, 592.0580000000001, 20.648) + ..lineTo(278.9780000000001, 20.648) + ..cubicTo(276.60200000000015, 20.648, 274.4110000000001, 19.958, + 273.0530000000001, 18.841) + ..lineTo(270.7190000000001, 16.921) + ..cubicTo(269.9010000000001, 16.249, 268.9040000000001, 15.693, + 267.7910000000001, 15.266) + ..close(); + canvas + ..drawPath( + speakerPath, + Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.003 + ..color = const Color(0xFF353535), + ) + ..drawPath( + speakerPath, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0xFF0F0E0E), + ); + } + + @override + bool shouldRepaint(covariant CustomPainter oldDelegate) { + return false; + } +} diff --git a/device_frame/lib/src/devices/ios/iphone_17_pro_max/screen.g.dart b/device_frame/lib/src/devices/ios/iphone_17_pro_max/screen.g.dart new file mode 100644 index 0000000..e6e6ec4 --- /dev/null +++ b/device_frame/lib/src/devices/ios/iphone_17_pro_max/screen.g.dart @@ -0,0 +1,55 @@ +part of 'device.dart'; + +// Generated with https://fluttershapemaker.com and manually adjusted. +final _screenPath = Path() + // Screen. + ..moveTo(32.401, 236.595) + ..cubicTo(32.401, 162.716, 32.401, 125.776, 46.776, 97.55799999999999) + ..arcToPoint(Offset(104.415, 39.90899999999999), + radius: Radius.elliptical(131.9, 131.9), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(132.62800000000001, 25.53099999999999, 169.56, 25.53099999999999, + 243.426, 25.53099999999999) + ..lineTo(627.61, 25.53099999999999) + ..cubicTo(701.476, 25.53099999999999, 738.408, 25.53099999999999, 766.621, + 39.90899999999999) + ..arcToPoint(Offset(824.26, 97.55799999999999), + radius: Radius.elliptical(131.9, 131.9), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(838.635, 125.776, 838.635, 162.716, 838.635, 236.595) + ..lineTo(838.635, 1563.4) + ..cubicTo(838.635, 1637.2800000000002, 838.635, 1674.22, 824.26, 1702.44) + ..arcToPoint(Offset(766.621, 1760.0900000000001), + radius: Radius.elliptical(131.93, 131.93), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(738.408, 1774.4700000000003, 701.476, 1774.4700000000003, 627.61, + 1774.4700000000003) + ..lineTo(243.426, 1774.4700000000003) + ..cubicTo(169.56, 1774.4700000000003, 132.628, 1774.4700000000003, + 104.41499999999999, 1760.0900000000001) + ..arcToPoint(Offset(46.77599999999999, 1702.44), + radius: Radius.elliptical(131.93, 131.93), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(32.40099999999999, 1674.22, 32.40099999999999, 1637.28, + 32.40099999999999, 1563.4) + ..close() + // Dynamic Island. + ..moveTo(523.459, 47.574) + ..lineTo(347.577, 47.574) + ..cubicTo(327.416, 47.574, 311.073, 63.292, 311.073, 82.681) + ..cubicTo(311.073, 102.07, 327.416, 117.787, 347.577, 117.787) + ..lineTo(523.4590000000001, 117.787) + ..cubicTo(543.6200000000001, 117.787, 559.9630000000001, 102.069, + 559.9630000000001, 82.68100000000001) + ..cubicTo(559.9630000000001, 63.29100000000001, 543.6200000000001, + 47.57400000000001, 523.4590000000001, 47.57400000000001) + ..close() + ..fillType = PathFillType.evenOdd; diff --git a/device_frame/lib/src/devices/ios/iphone_air/device.dart b/device_frame/lib/src/devices/ios/iphone_air/device.dart new file mode 100644 index 0000000..3fecc1d --- /dev/null +++ b/device_frame/lib/src/devices/ios/iphone_air/device.dart @@ -0,0 +1,33 @@ +import 'dart:ui' as ui; + +import 'package:device_frame/src/info/device_type.dart'; +import 'package:device_frame/src/info/identifier.dart'; +import 'package:device_frame/src/info/info.dart'; +import 'package:flutter/material.dart'; + +part 'frame.g.dart'; +part 'screen.g.dart'; + +final info = DeviceInfo( + identifier: const DeviceIdentifier( + TargetPlatform.iOS, + DeviceType.phone, + 'iphone-air', + ), + name: 'iPhone Air', + pixelRatio: 3, + frameSize: const Size(1295, 2712), + screenSize: const Size(420, 912), + safeAreas: const EdgeInsets.only( + top: 68, + bottom: 34, + ), + rotatedSafeAreas: const EdgeInsets.only( + left: 68, + right: 68, + top: 20, + bottom: 29, + ), + framePainter: const _FramePainter(), + screenPath: _screenPath, +); diff --git a/device_frame/lib/src/devices/ios/iphone_air/frame.g.dart b/device_frame/lib/src/devices/ios/iphone_air/frame.g.dart new file mode 100644 index 0000000..8d5a928 --- /dev/null +++ b/device_frame/lib/src/devices/ios/iphone_air/frame.g.dart @@ -0,0 +1,374 @@ +part of 'device.dart'; + +// Generated with https://fluttershapemaker.com and manually adjusted. +class _FramePainter extends CustomPainter { + const _FramePainter(); + + @override + void paint(Canvas canvas, Size size) { + final buttonsPath = Path() + ..moveTo(1313, 806.925) + ..cubicTo(1313, 805.309, 1311.16, 804, 1308.88, 804) + ..lineTo(1302, 804) + ..lineTo(1302, 1116) + ..lineTo(1308.88, 1116) + ..cubicTo(1311.16, 1116, 1313, 1114.69, 1313, 1113.08) + ..close() + ..moveTo(0, 738.875) + ..cubicTo(0, 737.839, 1.843, 737, 4.125, 737) + ..lineTo(11, 737) + ..lineTo(11, 937) + ..lineTo(4.125, 937) + ..cubicTo(1.843, 937, 0, 936.161, 0, 935.125) + ..close() + ..moveTo(0, 985.875) + ..cubicTo(0, 984.839, 1.843, 984, 4.125, 984) + ..lineTo(11, 984) + ..lineTo(11, 1184) + ..lineTo(4.125, 1184) + ..cubicTo(1.843, 1184, 0, 1183.16, 0, 1182.12) + ..close() + ..moveTo(0, 530.172) + ..cubicTo(0, 529.525, 1.843, 529, 4.125, 529) + ..lineTo(11, 529) + ..lineTo(11, 654) + ..lineTo(4.125, 654) + ..cubicTo(1.843, 654, 0, 653.475, 0, 652.828) + ..close(); + canvas.drawPath( + buttonsPath, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0xFFC0CDD6), + ); + + final buttonsShadowPath = Path() + ..moveTo(1302, 804) + ..lineTo(1302, 1116) + ..close() + ..moveTo(11, 737) + ..lineTo(11, 937) + ..close() + ..moveTo(11, 984) + ..lineTo(11, 1184) + ..close() + ..moveTo(11, 529) + ..lineTo(11, 654) + ..close(); + canvas.drawPath( + buttonsShadowPath, + Paint() + ..color = const Color(0xFF000000) + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.0105 + ..maskFilter = MaskFilter.blur( + BlurStyle.inner, + size.width * 0.04, + ), + ); + + final backgroundPath = Path() + ..moveTo(9, 340.8) + ..cubicTo(9, 221.50900000000001, 9, 161.863, 32.216, 116.30000000000001) + ..arcToPoint(Offset(125.3, 23.216), + radius: Radius.elliptical(213, 213), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(170.863, 0, 230.509, 0, 349.8, 0) + ..lineTo(963.2, 0) + ..cubicTo(1082.49, 0, 1142.14, 0, 1187.7, 23.216) + ..arcToPoint(Offset(1280.78, 116.30000000000001), + radius: Radius.elliptical(212.98, 212.98), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(1304, 161.863, 1304, 221.509, 1304, 340.8) + ..lineTo(1304, 2371.2000000000003) + ..cubicTo(1304, 2490.4900000000002, 1304, 2550.1400000000003, 1280.78, + 2595.7000000000003) + ..cubicTo(1260.36, 2635.78, 1227.78, 2668.36, 1187.7, 2688.78) + ..cubicTo(1142.14, 2712, 1082.49, 2712, 963.2, 2712) + ..lineTo(349.8, 2712) + ..cubicTo( + 230.50900000000001, 2712, 170.863, 2712, 125.30000000000001, 2688.78) + ..arcToPoint(Offset(32.21600000000001, 2595.7000000000003), + radius: Radius.elliptical(212.98, 212.98), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(9, 2550.14, 9, 2490.49, 9, 2371.2) + ..close(); + canvas.drawPath( + backgroundPath, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0xFFB9C5CD), + // ..color = const Color(0xFF5F6E78), + // ..color = const Color(0xFFC0CDD6), + ); + + final antennasPath = Path() + ..moveTo(1304, 2438) + ..lineTo(1282, 2438) + ..lineTo(1282, 2418) + ..lineTo(1304, 2418) + ..close() + ..moveTo(31, 2438) + ..lineTo(9, 2438) + ..lineTo(9, 2418) + ..lineTo(31, 2418) + ..close() + ..moveTo(1304, 294) + ..lineTo(1282, 294) + ..lineTo(1282, 274) + ..lineTo(1304, 274) + ..close() + ..moveTo(31, 294) + ..lineTo(9, 294) + ..lineTo(9, 274) + ..lineTo(31, 274) + ..close(); + canvas.drawPath( + antennasPath, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0x20000000), + ); + + final bezelPath = Path() + ..moveTo(29, 346.4) + ..cubicTo(29, 232.14899999999997, 29, 175.02399999999997, 51.235, + 131.38599999999997) + ..arcToPoint(Offset(140.386, 42.23499999999997), + radius: Radius.elliptical(204, 204), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(184.024, 20, 241.149, 20, 355.4, 20) + ..lineTo(957.6, 20) + ..cubicTo(1071.85, 20, 1128.98, 20, 1172.6100000000001, 42.235) + ..arcToPoint(Offset(1261.7700000000002, 131.386), + radius: Radius.elliptical(204, 204), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(1284, 175.024, 1284, 232.149, 1284, 346.4) + ..lineTo(1284, 2365.6) + ..cubicTo(1284, 2479.85, 1284, 2536.98, 1261.77, 2580.6099999999997) + ..arcToPoint(Offset(1172.61, 2669.7699999999995), + radius: Radius.elliptical(204, 204), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(1128.98, 2692, 1071.85, 2692, 957.6, 2692) + ..lineTo(355.4, 2692) + ..cubicTo(241.14899999999997, 2692, 184.02399999999997, 2692, + 140.38599999999997, 2669.77) + ..arcToPoint(Offset(51.23499999999997, 2580.61), + radius: Radius.elliptical(204, 204), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(29, 2536.98, 29, 2479.85, 29, 2365.6) + ..close(); + canvas + ..drawPath( + bezelPath, + Paint() + ..color = const Color(0xFFC0CDD6) + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.005 + ..maskFilter = MaskFilter.blur( + BlurStyle.normal, + size.width * 0.003, + ), + ) + ..drawPath( + bezelPath, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0xFF000000), + ) + ..drawPath( + bezelPath, + Paint() + ..color = const Color(0x99FFFFFF) + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.009 + ..maskFilter = MaskFilter.blur( + BlurStyle.normal, + size.width * 0.006, + ), + ); + + final dynamicIslandPath = Path() + ..moveTo(529.093, 99) + ..lineTo(784.9069999999999, 99) + ..cubicTo(814.229, 99, 838, 122.953, 838, 152.5) + ..cubicTo(838, 182.047, 814.229, 206, 784.907, 206) + ..lineTo(529.093, 206) + ..cubicTo(499.771, 206, 476, 182.047, 476, 152.5) + ..cubicTo(476, 122.953, 499.771, 99, 529.093, 99) + ..close(); + canvas.drawPath( + dynamicIslandPath, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0xFF000000), + ); + + final cameraPath1 = Path() + ..moveTo(529.093, 168.55) + ..cubicTo(520.563, 168.55, 513.6479999999999, 161.58200000000002, + 513.6479999999999, 152.98600000000002) + ..cubicTo(513.6479999999999, 144.39000000000001, 520.5629999999999, + 137.42300000000003, 529.093, 137.42300000000003) + ..cubicTo(537.623, 137.42300000000003, 544.539, 144.39100000000002, + 544.539, 152.98600000000002) + ..cubicTo(544.539, 161.58100000000002, 537.624, 168.55, 529.093, 168.55); + canvas.drawPath( + cameraPath1, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0xFF131423), + ); + + final cameraPath2 = Path() + ..moveTo(516.544, 152.986) + ..cubicTo(516.544, 146.00199999999998, 522.163, 140.34099999999998, + 529.093, 140.34099999999998) + ..cubicTo(536.024, 140.34099999999998, 541.6429999999999, + 146.00199999999998, 541.6429999999999, 152.986) + ..cubicTo(541.6429999999999, 159.97, 536.0239999999999, 165.632, 529.093, + 165.632) + ..cubicTo(522.163, 165.632, 516.544, 159.97, 516.544, 152.986); + canvas.drawPath( + cameraPath2, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0xFF07144C), + ); + + final cameraPath3 = Path() + ..moveTo(539.68, 152.273) + ..cubicTo(539.4749999999999, 146.737, 534.6569999999999, 142.773, 529.16, + 142.773) + ..cubicTo(523.603, 142.773, 518.7239999999999, 146.814, 518.506, 152.409) + ..cubicTo(518.486, 152.935, 518.475, 153.45499999999998, 518.475, 153.959) + ..cubicTo(518.475, 154.46300000000002, 518.486, 154.983, 518.506, + 155.50900000000001) + ..cubicTo(518.7239999999999, 161.104, 523.603, 165.145, 529.16, 165.145) + ..cubicTo(534.6569999999999, 165.145, 539.475, 161.18200000000002, 539.68, + 155.64600000000002) + ..quadraticBezierTo(539.7109999999999, 154.8, 539.712, 153.959) + ..cubicTo(539.713, 153.118, 539.7, 152.835, 539.68, 152.273); + canvas.drawPath( + cameraPath3, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0x66030303), + ); + + final cameraPath4 = Path() + ..moveTo(529.093, 163.2) + ..cubicTo(526.428, 163.2, 524.2669999999999, 161.23999999999998, + 524.2669999999999, 158.82299999999998) + ..cubicTo(524.2669999999999, 156.40499999999997, 526.4279999999999, + 154.445, 529.093, 154.445) + ..cubicTo(531.759, 154.445, 533.92, 156.405, 533.92, 158.82299999999998) + ..cubicTo(533.92, 161.23999999999998, 531.759, 163.2, 529.093, 163.2); + canvas.drawPath( + cameraPath4, + Paint() + ..style = PaintingStyle.fill + ..shader = ui.Gradient.linear( + Offset(size.width * 0.5003808, size.height * 0.03650442), + Offset(size.width * 0.5003808, size.height * 0.07595870), + const [Color(0x451D869C), Color(0x4C2371C6), Color(0x4C040AAD)], + const [0, 0.371, 1], + ), + ); + + final cameraPath5 = Path() + ..moveTo(529.093, 163.2) + ..cubicTo(527.4939999999999, 163.2, 526.197, 161.893, 526.197, + 160.28199999999998) + ..cubicTo(526.197, 158.67099999999996, 527.494, 157.36399999999998, + 529.093, 157.36399999999998) + ..cubicTo(530.693, 157.36399999999998, 531.9889999999999, 158.67, + 531.9889999999999, 160.28199999999998) + ..cubicTo(531.9889999999999, 161.89299999999997, 530.6929999999999, 163.2, + 529.093, 163.2); + canvas.drawPath( + cameraPath5, + Paint() + ..style = PaintingStyle.fill + ..shader = ui.Gradient.linear( + Offset(size.width * 0.5003808, size.height * 0.03979240), + Offset(size.width * 0.5003808, size.height * 0.07595870), + const [Color(0x59005267), Color(0x59415967), Color(0x598700C7)], + const [0, 0.486, 1], + ), + ); + + final cameraPath6 = Path() + ..moveTo(529.093, 160.768) + ..cubicTo(524.828, 160.768, 521.371, 157.284, 521.371, 152.986) + ..cubicTo(521.371, 148.689, 524.828, 145.20499999999998, 529.093, + 145.20499999999998) + ..cubicTo(533.358, 145.20499999999998, 536.8159999999999, 148.689, + 536.8159999999999, 152.986) + ..cubicTo(536.8159999999999, 157.284, 533.358, 160.768, 529.093, 160.768); + canvas.drawPath( + cameraPath6, + Paint() + ..style = PaintingStyle.fill + ..shader = ui.Gradient.linear( + Offset(size.width * 0.4029650, size.height * 0.05336209), + Offset(size.width * 0.4029650, size.height * 0.05605236), + const [Color(0xFF5978DD), Color(0x9C312FAD), Color(0x001C1C86)], + const [0, 0.379, 1], + ), + ); + + final speakerPath = Path() + ..moveTo(785.867, 23.5) + ..arcToPoint(Offset(783.4019999999999, 25.468), + radius: Radius.elliptical(8, 8), + rotation: 0, + largeArc: false, + clockwise: false) + ..lineTo(781.646, 27.572) + ..cubicTo(780.64, 28.776, 779.043, 29.5, 777.3299999999999, 29.5) + ..lineTo(541.67, 29.5) + ..cubicTo(539.9559999999999, 29.5, 538.3589999999999, 28.776, + 537.3539999999999, 27.572) + ..lineTo(535.5989999999999, 25.468) + ..arcToPoint(Offset(533.1339999999999, 23.5), + radius: Radius.elliptical(8, 8), + rotation: 0, + largeArc: false, + clockwise: false) + ..close(); + canvas + ..drawPath( + speakerPath, + Paint() + ..style = PaintingStyle.stroke + ..strokeWidth = size.width * 0.005 + ..color = const Color(0xFF353535), + ) + ..drawPath( + speakerPath, + Paint() + ..style = PaintingStyle.fill + ..color = const Color(0xFF0F0E0E), + ); + } + + @override + bool shouldRepaint(covariant CustomPainter oldDelegate) { + return false; + } +} diff --git a/device_frame/lib/src/devices/ios/iphone_air/screen.g.dart b/device_frame/lib/src/devices/ios/iphone_air/screen.g.dart new file mode 100644 index 0000000..ba9e49a --- /dev/null +++ b/device_frame/lib/src/devices/ios/iphone_air/screen.g.dart @@ -0,0 +1,53 @@ +part of 'device.dart'; + +// Generated with https://fluttershapemaker.com and manually adjusted. +final _screenPath = Path() + // Screen. + ..moveTo(51, 300.6) + ..cubicTo(51, 232.10500000000002, 51, 197.85700000000003, 60.006, + 170.14100000000002) + ..arcToPoint(Offset(178.14, 52.006), + radius: Radius.elliptical(184, 184), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(205.857, 43, 240.105, 43, 308.6, 43) + ..lineTo(1004.4, 43) + ..cubicTo(1072.9, 43, 1107.1399999999999, 43, 1134.86, 52.006) + ..arcToPoint(Offset(1252.9899999999998, 170.14100000000002), + radius: Radius.elliptical(183.98, 183.98), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(1261.9999999999998, 197.85700000000003, 1261.9999999999998, + 232.10500000000002, 1261.9999999999998, 300.6) + ..lineTo(1261.9999999999998, 2411.4) + ..cubicTo(1261.9999999999998, 2479.9, 1261.9999999999998, 2514.14, + 1252.9899999999998, 2541.86) + ..arcToPoint(Offset(1134.8599999999997, 2659.9900000000002), + radius: Radius.elliptical(183.97, 183.97), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(1107.1399999999996, 2669.0000000000005, 1072.8999999999996, + 2669.0000000000005, 1004.3999999999996, 2669.0000000000005) + ..lineTo(308.6, 2669.0000000000005) + ..cubicTo(240.10500000000002, 2669.0000000000005, 205.85700000000003, + 2669.0000000000005, 178.14100000000002, 2659.9900000000002) + ..arcToPoint(Offset(60.006000000000014, 2541.86), + radius: Radius.elliptical(183.98, 183.98), + rotation: 0, + largeArc: false, + clockwise: true) + ..cubicTo(51, 2514.14, 51, 2479.9, 51, 2411.4) + ..close() + // Dynamic Island. + ..moveTo(529.093, 99) + ..lineTo(784.9069999999999, 99) + ..cubicTo(814.229, 99, 838, 122.953, 838, 152.5) + ..cubicTo(838, 182.047, 814.229, 206, 784.907, 206) + ..lineTo(529.093, 206) + ..cubicTo(499.771, 206, 476, 182.047, 476, 152.5) + ..cubicTo(476, 122.953, 499.771, 99, 529.093, 99) + ..close() + ..fillType = PathFillType.evenOdd;