Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ PODS:
- Flutter
- camera_avfoundation (0.0.1):
- Flutter
- device_info_plus (0.0.1):
- Flutter
- disk_space_plus (0.0.1):
- Flutter
- Firebase/CoreOnly (12.8.0):
Expand Down Expand Up @@ -251,6 +253,7 @@ PODS:
DEPENDENCIES:
- app_links (from `.symlinks/plugins/app_links/ios`)
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- disk_space_plus (from `.symlinks/plugins/disk_space_plus/ios`)
- firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
Expand Down Expand Up @@ -311,6 +314,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/app_links/ios"
camera_avfoundation:
:path: ".symlinks/plugins/camera_avfoundation/ios"
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
disk_space_plus:
:path: ".symlinks/plugins/disk_space_plus/ios"
firebase_analytics:
Expand Down Expand Up @@ -357,6 +362,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
app_links: a754cbec3c255bd4bbb4d236ecc06f28cd9a7ce8
camera_avfoundation: 5675ca25298b6f81fa0a325188e7df62cc217741
device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe
disk_space_plus: a36391fb5f732dbdd29628b0bac5a1acbd43aaef
Firebase: 9a58fdbc9d8655ed7b79a19cf9690bb007d3d46d
firebase_analytics: b5a19eaf3e4bf4187b0815ef4850b8916e2bc549
Expand Down
11 changes: 10 additions & 1 deletion lib/ui/widgets/camera_viewfinder.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import 'dart:io' show Platform;

import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
import 'package:device_info_plus/device_info_plus.dart';

class CameraViewfinder extends StatefulWidget {
final void Function(XFile) onPictureTaken;
Expand Down Expand Up @@ -37,9 +40,15 @@ class _CameraViewfinderState extends State<CameraViewfinder>
break;
}
}

// This is a temporary workaround for iPhone 17 family devices
final iOS = Platform.isIOS ? await DeviceInfoPlugin().iosInfo : null;

_controller = CameraController(
cameraToUse,
ResolutionPreset.max,
iOS != null && iOS.utsname.machine.contains("iPhone18")
? ResolutionPreset.ultraHigh
: ResolutionPreset.max,
enableAudio: false,
);

Expand Down
24 changes: 24 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.0"
device_info_plus:
dependency: "direct main"
description:
name: device_info_plus
sha256: "4df8babf73058181227e18b08e6ea3520cf5fc5d796888d33b7cb0f33f984b7c"
url: "https://pub.dev"
source: hosted
version: "12.3.0"
device_info_plus_platform_interface:
dependency: transitive
description:
name: device_info_plus_platform_interface
sha256: e1ea89119e34903dca74b883d0dd78eb762814f97fb6c76f35e9ff74d261a18f
url: "https://pub.dev"
source: hosted
version: "7.0.3"
diacritic:
dependency: transitive
description:
Expand Down Expand Up @@ -1703,6 +1719,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.15.0"
win32_registry:
dependency: transitive
description:
name: win32_registry
sha256: "6f1b564492d0147b330dd794fee8f512cec4977957f310f9951b5f9d83618dae"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
xdg_directories:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ dependencies:
git:
url: https://github.com/Moseco/flutter_exif_rotation
ref: '55b72de'
device_info_plus: ^12.3.0

dependency_overrides:
flutter_statusbarcolor_ns:
Expand Down