我正在尝试添加页面的SingleChildScrollView,但它似乎不工作,找不到原因。我没有收到任何溢出错误,但是Fitbutton在屏幕上看不到。我试着在网上搜索,但没有找到任何相关的解决方案。这是我尝试过的代码片段:
return Scaffold(
body:SingleChildScrollView(
child: Form(
key:_formKey,
child: Padding(
padding: const EdgeInsets.all(0.0),
child: Stack(
children: <Widget>[
Container(
decoration:( ...
),
)
),
Positioned(
top: MediaQuery.of(context).size.width * 0.10,
child: Container(
margin: EdgeInsets.all(13.0),
child:Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text("Welcome",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 25.0),),
SizedBox(
height: 22,
),
Stack(
alignment: Alignment.centerLeft,
children: [
Container(
height:60.0,
padding: EdgeInsets.only(left: 53.0),
child: buildNameField()
),
CircleAvatar(
...
),
],
),
SizedBox(
height: 22.0,
),
Stack(
alignment: Alignment.centerLeft,
children: [
.....
],
),
SizedBox(
height: 10,
),
Stack(
alignment: Alignment.centerLeft,
children: [
...
],
),
SizedBox(height: 22),
FitButton(
....
),
Padding(
padding: const EdgeInsets.only(top: 16),
child: _buildSignInButton(),
),
]
),
),
),],
),
),
),),
);任何帮助都是最好的!
发布于 2020-12-19 18:27:11
可以解决从表单中删除SingleChildScrollView和换行到列的问题。
发布于 2020-12-19 21:21:24
尝试将form包装在sizedBox中,然后使用SingleChildScrollView包装sizedBox
https://stackoverflow.com/questions/65368338
复制相似问题