const TextField({ Key key, this.controller, ////操纵器,操纵TextField文本 this.focusNode, this.decoration = const InputDecoration(), //键入器装饰设计 TextInputType keyboardType, ////键入的种类 this.textInputAction, this.textCapitalization = TextCapitalization.none, this.style, this.textAlign = TextAlign.start, //文本显示信息部位 this.autofocus = false, this.obscureText = false, this.autocorrect = true, this.maxLines = 1, this.maxLength, this.maxLengthEnforced = true, this.onChanged, //文本更改开启 this.onEditingComplete, this.onSubmitted, ////文本递交开启(电脑键盘功能键) this.inputFormatters, this.enabled, this.cursorWidth = 2.0, this.cursorRadius, this.cursorColor, this.keyboardAppearance, this.scrollPadding = const EdgeInsets.all(20.0), })1.decoration
const InputDecoration({ this.icon, this.labelText, this.labelStyle, this.helperText, this.helperStyle, this.hintText, this.hintStyle, this.errorText, this.errorStyle, this.errorMaxLines, this.isDense, this.contentPadding, this.prefixIcon, this.prefix, this.prefixText, this.prefixStyle, this.suffixIcon, this.suffix, this.suffixText, this.suffixStyle, this.counterText, this.counterStyle, this.filled, this.fillColor, this.errorBorder, this.focusedBorder, this.focusedErrorBorder, this.disabledBorder, this.enabledBorder, this.border, this.enabled = true, this.semanticCounterText, })①labelText
labelText: '你要键入名字', labelStyle: new TextStyle( fontSize: 13.0, color: ent),实际效果如图所示:
hintText: '请键入名字', hintStyle: new TextStyle(fontSize: 13.0, color: Colors.pink),如图所示
labelText: '你要键入名字', labelStyle: new TextStyle( fontSize: 13.0, color: ent), helperText: '嘻嘻嘻',
// icon: new Image.asset('images/goods_image.png', width: 30.0, height: 30.0,), icon: new Icon(Icons.person), labelText: '你要键入名字', labelStyle: new TextStyle(fontSize: 13.0, color: ent), helperText: '嘻嘻嘻',
// icon: new Image.asset('images/goods_image.png', width: 30.0, height: 30.0,), icon: new Icon(Icons.person), labelText: '你要键入名字', labelStyle: new TextStyle(fontSize: 13.0, color: ent), helperText: '嘻嘻嘻', contentPadding: new EdgeInsets.all(0.0)
prefixIcon: new Icon(Icons.people)
import 'package:flutter/material.dart'; class FourPage extends StatelessWidget { //手机上号的操纵器 TextEditingController phoneController = TextEditingController(); //登陆密码的操纵器 TextEditingController passController = TextEditingController(); @override Widget build(BuildContext context) { return new Scaffold( appBar: new AppBar(title: new Text('第四个页面'),), body: new Container( // color: Colors.pink, margin: new EdgeInsets.all(10.0), child: new Column( children: Widget [ TextField( controller: phoneController, keyboardType: TextInputType.number, decoration: InputDecoration( contentPadding: EdgeInsets.all(10.0), icon: Icon(Icons.phone), labelText: '请键入你的客户名)', helperText: '请键入申请注册的手机上号', autofocus: false, TextField( controller: passController, keyboardType: TextInputType.number, decoration: InputDecoration( contentPadding: EdgeInsets.all(10.0), icon: Icon(Icons.lock), labelText: '请键入登陆密码)', obscureText: true), RaisedButton( onPressed: _login, child: Text('登陆'), void _login() { print({'手机上号': phoneController.text, '登陆密码': passController.text}); phoneController.clear(); }
本站內容假如沒有标明出處,全部权均归本网站,出示完全免费免费下载使用,但不可用以商业服务赢利。假如标明出處,则来源于于互连网,本网站不做商业服务主要用途。假如本网站有內容侵害到您的利益,请致函网站站长电子邮箱,本网站当马上删掉。
联络大家它是我喜欢模版网摘抄自简书的一篇对flutter TextFiled文字键入框……
中山市市市市订购手机上手机微信手机微信微信小程序开发设……
如今仅有那些受欢迎的物品,才会愈来愈令人感觉十分的有味儿……
针对1些网站的制作,有的情况下,大家不久在刚开始接手这个事……
在现如今环节最有效的企业wap企业网站建设做外链的技巧,一般……
企业网站建设说难不难,说易不容易。依据互联网多年工作经验……