),focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.green,//边框颜色为绿色width:5,//宽度为5)),labelText:"labelText",helperText:"helperText",// errorText: "errorText",hintText:"hintText",prefixIcon: Icon(Icons.perm_identity), ), ); 2. UnderlineInputBorder(底边线,默认...
shape: OutlineInputBorder( borderSide: BorderSide(color: Colors.red), borderRadius: BorderRadius.circular(10), ), child: Text('老孟'), onPressed: () {}, ) UnderlineInputBorder 下划线边框 RaisedButton( shape: UnderlineInputBorder( borderSide: BorderSide(color: Colors.red), ), child: Text('...
/// OutlineInputBorder 上下左右 都有边框 /// UnderlineInputBorder 只有下边框 默认使用的就是下边框 border:OutlineInputBorder( ///设置边框四个角的弧度 borderRadius:BorderRadius.all(Radius.circular(10)), ///用来配置边框的样式 borderSide:BorderSide( ///设置边框的颜色 color:Colors.red, ///设置...
5 OutlineInputBorder和UnderlineInputBorder 常用与输入框的边线 Material _buildOutlineInputBorder() { return Material( color: Colors.orangeAccent, elevation: 2, shape: OutlineInputBorder( borderSide: BorderSide(width: 2.0, color: Colors.purple), borderRadius: BorderRadius.circular(20.0), ), child: ...
// 四个边分别指定颜色和宽度, 当只给bottom时与UnderlineInputBorder一致效果 // shape: Border(top: b, bottom: b, right: b, left: b) // 底部线 // shape: UnderlineInputBorder( borderSide:BorderSide(color: Color(0xFFFFFFFF), style: BorderStyle.solid, width: 2)) ...
this.decoration = const InputDecoration(), //输入框的装饰器,用来修改外观 TextInputType keyboardType, //设置输入类型,不同的输入类型键盘不一样 this.textInputAction, //用于控制键盘动作(一般位于右下角,默认是完成) this.textCapitalization = TextCapitalization.none, ...
UnderlineInputBorder 下划线边框 RaisedButton(shape:UnderlineInputBorder(borderSide:BorderSide(color:Colors.red),),child:Text('老孟'),onPressed:(){},) image-20200522184216659 ClipRect ClipRect组件使用矩形裁剪子组件,通常情况下,ClipRect作用于CustomPaint、CustomSingleChildLayout、CustomMultiChildLayout、Align、...
UnderlineInputBorder 下划线边框 代码语言:javascript 复制 RaisedButton(shape:UnderlineInputBorder(borderSide:BorderSide(color:Colors.red),),child:Text('老孟'),onPressed:(){},) image-20200522184216659 ClipRect ClipRect组件使用矩形裁剪子组件,通常情况下,ClipRect作用于CustomPaint、CustomSingleChildLayout、Custo...
UnderlineInputBorder底边线,默认的 代码语言:txt 复制 TextField( decoration: InputDecoration( border: OutlineInputBorder( borderRadius: BorderRadius.all( Radius.circular(30), // 圆角 ), borderSide: BorderSide( color: Colors.amber, //线框颜色为黄色 ...
enabledBorder: OutlineInputBorder( //设置输入框可编辑时的边框样式 borderRadius: BorderRadius.circular(20.0), //输入框圆角 borderSide: const BorderSide(color: Colors.white, width: 0) //输入框白色隐藏 ), border: OutlineInputBorder( borderRadius: BorderRadius.circular(20.0), //输入框圆角 ...