如何解决Flutter:我的ScrollWidget向下滚动,但是我的“提交”和“取消”“凸起”按钮变得不可见或不显示
显示错误是
无效的矩阵
我想要我的提交按钮和取消按钮,因为这是扑朔迷离的表单提交 我的ScrollWidget正在向下滚动,但是我的“提交”和“取消举起”按钮不可见或未显示。 代码如下:
body: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,children: <Widget>[
SizedBox(
height: 20.0,),Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,children: <Widget>[
Expanded(
flex: 1,child: Padding(
padding: const EdgeInsets.all(8.0),child: TextField(
autofocus: false,decoration: InputDecoration(
prefixIcon: Icon(Icons.person_pin),labelText: 'CompanyName',hintText: 'Type the company Name',Expanded(
flex: 1,child: TextField(
autofocus: false,decoration: InputDecoration(
prefixIcon: Icon(Icons.phone_android),labelText: 'ModelName',hintText: 'Type the Model Name',],child: TextField(
keyboardType: TextInputType.number,inputFormatters: [
WhitelistingTextInputFormatter.digitsOnly
],decoration: InputDecoration(
labelText: 'SerielNumber',hintText: 'Type the Seriel Number',prefixIcon: Icon(Icons.view_headline),children: <Widget>[
RaisedButton(
color: Color(0xff476cfb),onPressed: () {
Navigator.of(context).pop();
},elevation: 4.0,splashColor: Colors.blueGrey,child: TextField(
maxLines: null,autofocus: false,decoration: InputDecoration(
prefixIcon: Icon(Icons.place),labelText: 'Cancel',RaisedButton(
color: Color(0xff476cfb),onPressed: () {
uploadPic(context);
},decoration: InputDecoration(
prefixIcon: Icon(Icons.place),labelText: 'Submit',)
],);
}
}
解决方法
问题出在您的RaisedButton的孩子身上。 TextField必须具有边界宽度。 您可以使用“文本”小部件或“容器”小部件作为RaisedButton的子级,并使用“行”作为Container的子级来设置标题和图标,例如以下代码:
library(dplyr)
df %>% mutate(character = sub(".+title=\"(.+)\".+","\\1",character))
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。