Checkbox,Date & Time Pickers,Radio,Slider,Switch,TextField,在表单例子中有日期的用法
文本框的示例,包含有样式的设计
TextField(
decoration: InputDecoration(
border: InputBorder.none,
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(30),
borderSide: BorderSide(color: Colors.grey),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(30),
borderSide: BorderSide(color: Colors.amber),
),
contentPadding: EdgeInsets.all(8),
hintText: 'Add comment',
prefixIcon: Container(
margin: EdgeInsets.all(20),
width: 48,
height: 48,
decoration: BoxDecoration(
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: Colors.black45,
offset: Offset(0, 2),
blurRadius: 6,
)
],
),
child: CircleAvatar(
child: ClipOval(
child: Image(
image: AssetImage(widget.post.authorImageUrl),
fit: BoxFit.cover,
),
),
),
),
suffixIcon: Container(
margin: EdgeInsets.only(right: 4),
width: 70,
child: TextButton(
style: ButtonStyle(
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30)),
),
),
onPressed: () {
print('Post comment');
},
child: Icon(
Icons.send,
size: 25,
color: Colors.blue,
),
),
),
),
),
https://blog.youkuaiyun.com/yuzhiqiang_1993/article/details/88204031