输入文本后,在 Flutter 集成测试中点击 enter/done/return 按钮

问题描述

await tester.enterText(mySearchField,'my search text');
await tester.showKeyboard(mySearchField);
await tester.sendKeyDownEvent(LogicalKeyboardKey.enter);

// do something to wait for 2 seconds
await tester.pumpAndSettle();
await Future.delayed(const Duration(seconds: 10),() {});

搜索字段中输入文本后,我试图点击虚拟键盘上的完成/输入/提交按钮..

如何做到这一点,以及如何等待结果(异步请求)...

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)