大佬教程收集整理的这篇文章主要介绍了当我滚动时,颤动的表格数据消失了,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
@override Widget build(BuildContext context) { var _children = <Widget>[ new Center( child: new Text(widget.prov.fname + widget.prov.lname,style: new TextStyle(fontSize: 20.0,fontWeight: FontWeight.bold),),new Center( child: new Container( padding: new EdgeInsets.only( left: 125.0,right: 125.0,bottom: 50.0),child: new Image.network('http://174.138.61.246:8080/getimage/'+widget.prov.pic.assetName),) ),new Form( key: _formKey,autovalidate: _autovalidate,onWillPop: _warnUserAboutInvalidData,child: new Expanded( child: new ListView( padding: const EdgeInsets.symmetric(horizontal: 16.0),children: <Widget>[ new TextFormField( decoration: const InputDecoration( icon: const Icon(Icons.person),hintText: 'First Name?',labelText: 'First Name *',onSaved: (String value) { referral.fname = value; },validator: _validatename,new TextFormField( decoration: const InputDecoration( icon: const Icon(Icons.person),hintText: 'last name?',labelText: 'last name *',onSaved: (String value) { referral.lname = value; },new TextFormField( decoration: const InputDecoration( icon: const Icon(Icons.phonE),hintText: 'How to contact?',labelText: 'Phone number *',prefixText: '+1' ),keyboardType: TexTinputType.phone,onSaved: (String value) { referral.contact = value; },validator: _validatePhonenumber,// TexTinputFormatters are applied in sequence. inputFormatters: <TexTinputFormatter> [ WhitelisTingTexTinputFormatter.digitsOnly,// Fit the validaTing format. _phonenumberFormatter,],new TextFormField( decoration: const InputDecoration( hintText: 'Tell us about patient',HelperText: 'It does not have to be detailed yet',labelText: 'Referral Details',maxLines: 5,new _datetiR_796_11845@ePicker( labelText: 'DOB',SELEctedDate: _fromDate,SELEctDate: (datetiR_796_11845@e datE) { setState(() { referral.dob = date; }); },new InputDecorator( decoration: const InputDecoration( labelText: 'Type of Appointment',hintText: 'Choose an Appointment Type',isEmpty: _typeAppt == null,child: new DropdownButton<String>( value: _typeAppt,isDense: true,onChanged: (String newvalue) { setState(() { _typeAppt = newValue; }); },items: _allTypeAppt.map((String value) { return new DropdownMenuItem<String>( value: value,child: new Text(value),); }).toList(),) ) ),/*new refreshInDicator( child: new ListView.builder( itemBuilder: _itemBuilder,itemCount: listcount,onrefresh: _onrefresh,*/ ]; return new Scaffold( appBar: new AppBar(title: new Text("My Provider")),body: new column( children: _children,); }
要永久保存值,我建议使用TextFields并将输入保存到TextField的onChanged()
方法中,或者使用TextEditingController.
以上是大佬教程为你收集整理的当我滚动时,颤动的表格数据消失了全部内容,希望文章能够帮你解决当我滚动时,颤动的表格数据消失了所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。