fix scan card
This commit is contained in:
@@ -260,11 +260,11 @@ import ZXingObjC
|
||||
|
||||
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
|
||||
print("User from manual input: \(textField.text!)")
|
||||
sendResult(textField.text!)
|
||||
sendResult(textField.text!, buttonState)
|
||||
return true
|
||||
}
|
||||
|
||||
func sendResult(_ str: String) {
|
||||
func sendResult(_ str: String, _ buttonState: ButtonState) {
|
||||
platformChannel?.invokeMethod("findUser", arguments: [str, buttonState.searchType], result: { (result: Any?) in
|
||||
if result is FlutterError {
|
||||
print("Result is nil (ios code)");
|
||||
@@ -423,7 +423,7 @@ import ZXingObjC
|
||||
points.append(windowPointValue)
|
||||
}
|
||||
print("User from scanner: \(result.text)")
|
||||
sendResult(result.text)
|
||||
sendResult(result.text, ButtonState.card)
|
||||
print(result.text)
|
||||
self.capture.stop()
|
||||
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(2 * Double(NSEC_PER_SEC)) / Double(NSEC_PER_SEC), execute: {() -> Void in
|
||||
|
||||
Reference in New Issue
Block a user