0

当我在 TextField 中输入类似“aA”的字符串时,当我输入大写字母时会发生异常,但是应用程序不会崩溃。

这是我的例外:

════════ 服务库捕获的异常═════════════════════════════␐═══════════在平台消息回调期间抛出:当 keysPressed 中没有键时,尝试发送按键按下事件。如果正在发送的键事件未正确设置其修饰符标志,则可能会出现此状态。这是事件: RawKeyDownEvent#67162(logicalKey: LogicalKeyboardKey#70039(keyId: "0x100070039", keyLabel: "Caps Lock", debugName: "Caps Lock"), physicalKey: PhysicalKeyboardKey#70039(usbHidUsage: "0x00070039", debugName: "Caps Lock")) 及其数据: RawKeyEventDataAndroid(keyLabel: flags: 8, codePoint: 0, keyCode: 115, scanCode: 58, metaState: 0, modifiers down: {}) 'package:flutter/src/services/raw_keyboard .dart':断言失败:第 666 行 pos 7:'事件是!RawKeyDownEvent || _keysPressed.isNotEmpty'

4

0 回答 0