解决flutter webview在iOS模拟器中输入框不能输入的问题

在ios > Runner > AppDelegate.swift中添加以下代码即可:

extension FlutterViewController {
    open override func pressesBegan(_ presses: Set<UIPress>, with event: UIPressesEvent?) {
        super.pressesBegan(presses, with: event)
    }

    open override func pressesEnded(_ presses: Set<UIPress>, with event: UIPressesEvent?) {
        super.pressesEnded(presses, with: event)
    }

    open override func pressesCancelled(_ presses: Set<UIPress>, with event: UIPressesEvent?) {
        super.pressesCancelled(presses, with: event)
    }
}

转载原文:https://dev.to/0xbf/fix-problem-physical-keyboard-can-t-type-in-flutter-s-webview-2f1j

你可能感兴趣的:(ios,flutter,webview)