首页 > 其他 > 详细

Radio

时间:2020-03-13 15:59:39      阅读:75      评论:0      收藏:0      [点我收藏+]
String _character = ‘A‘;
 
Radio<String>(
  value: ‘A‘, // 代表的值
  groupValue: _character, // 当前radio group选中的值,当该值与value值匹配时则被选中
  onChanged: (String newValue) {
    setState(() { // 点击当前控件时更新状态
      _character = newValue;
    });
  },
),
Radio<String>(
  value: ‘B‘,
  groupValue: _character,
  onChanged: (String newValue) {
    setState(() {
      _character = newValue;
    });
  },
),
Radio<String>(
  value: ‘C‘,
  groupValue: _character,
  onChanged: (String newValue) {
    setState(() {
      _character = newValue;
    });
  },
)

 

Radio

原文:https://www.cnblogs.com/timba1322/p/12486892.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!