flutter - 如何使用 SingleChildScrollView 和反向控制 DraggableScrollableSheet
问题描述
我需要使用DraggableScrollableSheet
withSingleChildScrollView
和 setreverse
来跳转TextField
。
但是在我设置reverse
为true之后,DraggableScrollableSheet
也是反转了,我该如何解决这个问题?
DraggableScrollableSheet(
minChildSize: 0.73,
maxChildSize: 0.83,
initialChildSize: 0.73,
builder: (context, scroll) => SingleChildScrollView(
reverse: true,
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom),
controller: scroll,
child: Column(
children: <Widget>[
TextFormField(
decoration: InputDecoration(),
),
TextFormField(
decoration: InputDecoration(),
),
TextFormField(
decoration: InputDecoration(),
),
],
),
))
解决方案
推荐阅读
- discord.js - 错误提供的选项不是对象。在 Message.delete
- html - 页面转向 http 而不是 https 并且不加载导航栏
- sql - 用于 SQL 查询的弹性搜索查询
- java - 从 int[] 到 int 的不兼容转换
- javascript - 我怎样才能让我的 Discord 机器人在被提及时识别它?
- python - IndentationError: unindent does not match any external indentation level 帮我解决这个问题?
- c# - 玩家与对象碰撞后如何再次重生对象?
- java - 如果数据已经存在,Android Studio SQLite 不会将数据插入数据库
- api - Cypress api 测试 graphql 查询和查询变量
- python - 如何将来自客户端的消息存储在服务器中并通过 Flask 中的某些路由进一步发送