ソースを参照

Calling the function with passing the parameters of the width and height of the scanning area for IOS

flutter-beta
Tihomirov 4年前
コミット
f6ea193af2
2個のファイルの変更4行の追加2行の削除
  1. +2
    -1
      ios/Classes/QRView.swift
  2. +2
    -1
      lib/src/qr_code_scanner.dart

+ 2
- 1
ios/Classes/QRView.swift ファイルの表示

@@ -56,7 +56,8 @@ public class QRView:NSObject,FlutterPlatformView {
self?.setDimensions(result,
width: arguments["width"] ?? 0,
height: arguments["height"] ?? 0,
scanArea: arguments["scanArea"] ?? 0,
scanArea: arguments["scanAreaWidth"] ?? 0,
scanArea: arguments["scanAreaHeight"] ?? 0,
scanAreaOffset: arguments["scanAreaOffset"] ?? 0)
case "startScan":
self?.startScan(call.arguments as! Array<Int>, result)


+ 2
- 1
lib/src/qr_code_scanner.dart ファイルの表示

@@ -334,7 +334,8 @@ class QRViewController {
await channel.invokeMethod('setDimensions', {
'width': renderBox.size.width,
'height': renderBox.size.height,
'scanArea': overlay?.cutOutWidth ?? 0, //Todo
'scanAreaWidth': overlay?.cutOutWidth ?? 0,
'scanAreaHeight': overlay?.cutOutHeight ?? 0,
'scanAreaOffset': overlay?.cutOutBottomOffset ?? 0
});
return true;


読み込み中…
キャンセル
保存