Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improved scan time on ios #381

Merged
merged 1 commit into from
Apr 18, 2024
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
1 change: 1 addition & 0 deletions ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-netknights.xcconfig"
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-netknights_debug.xcconfig"
#include "Generated.xcconfig"
3 changes: 2 additions & 1 deletion ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release-netknights.xcconfig"
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release-netknights_debug.xcconfig"
#include "Generated.xcconfig"
12 changes: 7 additions & 5 deletions ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=C:\src\flutter"
export "FLUTTER_APPLICATION_PATH=C:\Users\Frank Merkel\Documents\GitHub\pi-authenticator"
export "FLUTTER_ROOT=/Users/frankmerkel/src/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/frankmerkel/Documents/GitHub/pi-authenticator"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_TARGET=/Users/frankmerkel/Documents/GitHub/pi-authenticator/lib/mains/main_netknights.dart"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=4.3.1"
export "FLUTTER_BUILD_NUMBER=403101"
export "FLUTTER_BUILD_NUMBER=403106"
export "DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==,RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC8yZTRiYTljNmZiNDk5Y2NkNGU4MTQyMDU0Mzc4M2NjNzI2N2FlNDA2Lw==,RkxVVFRFUl9BUFBfRkxBVk9SPW5ldGtuaWdodHM="
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.dart_tool/package_config.json"
export "PACKAGE_CONFIG=/Users/frankmerkel/Documents/GitHub/pi-authenticator/.dart_tool/package_config.json"
export "FLAVOR=netknights"
126 changes: 64 additions & 62 deletions ios/Runner.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleName</key>
<string>$(BUNDLE_DISPLAY_NAME)</string>
<string>$(PRODUCT_NAME)</string>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
Expand Down
4 changes: 1 addition & 3 deletions ios/Runner/Runner.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
<key>aps-environment</key>
<string>development</string>
<key>com.apple.security.application-groups</key>
<array>
<string>group.authenticator_home_widget_group</string>
</array>
<array/>
</dict>
</plist>
15 changes: 7 additions & 8 deletions lib/utils/image_converter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,13 @@ class ImageConverter {
order: imglib.ChannelOrder.bgra,
);
return ImageConverter(
image: imglib.copyCrop(
img,
x: cropLeft,
y: cropTop,
width: img.width - cropLeft - cropRight,
height: img.height - cropTop - cropBottom,
),
);
image: imglib.copyCrop(
img,
x: cropLeft,
y: cropTop,
width: img.width - cropLeft - cropRight,
height: img.height - cropTop - cropBottom,
));
}

factory ImageConverter._fromYUV420(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class _QRScannerWidgetState extends State<QRScannerWidget> {
final int rotation = backCamera.sensorOrientation;
final cameraController = CameraController(
backCamera,
ResolutionPreset.max,
!kIsWeb && Platform.isAndroid ? ResolutionPreset.max : ResolutionPreset.medium,
imageFormatGroup: !kIsWeb && Platform.isAndroid ? ImageFormatGroup.nv21 : ImageFormatGroup.bgra8888,
enableAudio: false,
);
Expand Down
Loading