赞
踩
TextField(
style: const TextStyle(color: Color(0xFFA7ABBB),fontSize: 15),
inputFormatters: [DecimalInputFormat(decimalRange: 4)],
keyboardType: TextInputType.numberWithOptions(signed: true),
controller: TextEditingController.fromValue(TextEditingValue(
text: item['number'],
selection: TextSelection.fromPosition(TextPosition(
affinity: TextAffinity.downstream,
offset: item['number'].length)
))
),
decoration: InputDecoration(
counterText: '',
filled: true,
fillColor: Color(0xFF1A1A1A),
hintStyle: const TextStyle(color: Color(0xFFA7ABBB),fontSize: 15),
hintText: '请输入数量',
contentPadding: EdgeInsets.symmetric(horizontal: 15,vertical: 10),
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6),borderSide: BorderSide.none),
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6),borderSide: BorderSide.none),
suffixIcon: Container(alignment: Alignment.centerRight,child: Text('XBIT',style: const TextStyle(color: Color(0xFFA7ABBB),fontSize: 15),),margin: EdgeInsets.only(right: 15),),
suffixIconConstraints: BoxConstraints(maxWidth: 80)
),
onChanged: (v){
item['number'] = v;
setState(() { });
},
)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。