【问题标题】:ListView resizing after show up keyboardListView 在显示键盘后调整大小
【发布时间】:2020-11-19 08:00:49
【问题描述】:

创建 SearchDelegate 类 buildSuggestions 小部件后,当键盘显示在 ListView.build 中时,它会缩小。如何将 ListView 修复为全高小部件。

代码:

Widget buildSuggestions(BuildContext context) {
recentList = getResponse(context);
  return ListView.builder(
    itemCount: recentList.length,
    itemBuilder: (context, index) {
      SearchedCase object = recentList[index];
      print(object);
      return _listTileResult(context, object);
    }
  );}

gif showing the problem

【问题讨论】:

  • 你试过用 true 收缩包装吗??
  • @asn21 是的,结果相同

标签: flutter dart


【解决方案1】:
Scaffold(
  resizeToAvoidBottomInset: false,
  ...
)

【讨论】:

  • 你在什么上运行它?您是否尝试过其他设备/模拟器?
猜你喜欢
  • 2012-09-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-03-14
  • 2019-03-19
相关资源
最近更新 更多