摘要:
bool _switchChecked = true; Switch( value: true, activeColor: Colors.blueAccent, // 激活状态开关颜色 activeTrackColor: Colors.lightBlue, //激活状态开关轨道颜色 onChange 阅读全文
posted @ 2020-03-13 15:40
lai1322
阅读(123)
评论(0)
推荐(0)
摘要:
String _character = 'A'; Radio<String>( value: 'A', // 代表的值 groupValue: _character, // 当前radio group选中的值,当该值与value值匹配时则被选中 onChanged: (String newValue 阅读全文
posted @ 2020-03-13 15:39
lai1322
阅读(181)
评论(0)
推荐(0)
摘要:
Checkbox( value: true, onChanged: null, tristate: true, ), Checkbox( value: null, // 为null时tristate值必须为true,表示有三种状态 onChanged: (checked) {}, activeCol 阅读全文
posted @ 2020-03-13 15:38
lai1322
阅读(212)
评论(0)
推荐(0)
摘要:
CupertinoTextField( controller: TextEditingController(text: 'Hello Flutter'), // 默认输入内容 ), CupertinoTextField( placeholder: 'please input something', 阅读全文
posted @ 2020-03-13 15:37
lai1322
阅读(2710)
评论(0)
推荐(0)
摘要:
TextField( controller: TextEditingController(text: 'Hello Flutter'), // 默认输入内容 ), TextField( decoration: InputDecoration( //输入框装饰 hintText: 'please in 阅读全文
posted @ 2020-03-13 15:36
lai1322
阅读(154)
评论(0)
推荐(0)
摘要:
CupertinoButton( child: Text('Click'), disabledColor: Colors.blueGrey, //不可点击时按钮颜色,color属性不设置该值无效 onPressed: null, // onPressed为null视为不可点击 ), Cupertin 阅读全文
posted @ 2020-03-13 15:34
lai1322
阅读(154)
评论(0)
推荐(0)
摘要:
RaisedButton( onPressed: null, // onPressed为null视为不可点击 disabledTextColor: Colors.grey, // 不可点击的文本颜色 disabledColor: Colors.blue, // 不可点击的按钮颜色 disabledE 阅读全文
posted @ 2020-03-13 15:33
lai1322
阅读(258)
评论(0)
推荐(0)
摘要:
Icon( Icons.adb, ), Icon( Icons.adb, size: 50, //icon大小 ), Icon( Icons.adb, color: Colors.red, //icon颜色 ) 阅读全文
posted @ 2020-03-13 15:32
lai1322
阅读(178)
评论(0)
推荐(0)
摘要:
RichText( text: TextSpan( text: 'Flutter', style: TextStyle(color: Colors.black), children: <TextSpan>[ TextSpan( text: ' allows you', style: TextStyl 阅读全文
posted @ 2020-03-13 15:28
lai1322
阅读(237)
评论(0)
推荐(0)
摘要:
常用属性: crossAxisSpacing:网格间的空当。 crossAxisCount:一行放置的网格数量 body: GridView.count( padding: EdgeInsets.all(20.0), crossAxisSpacing: 10.0, crossAxisCount: 3 阅读全文
posted @ 2020-03-13 15:06
lai1322
阅读(111)
评论(0)
推荐(0)
浙公网安备 33010602011771号