Mr.*_*One 3 radio-button flutter
我在更改广播列表图块图标颜色时遇到问题。我尝试使用 ListTileTheme 但没有成功。顺便说一句,我在对话框中使用 RadioListTile,但我认为这不会影响它。
代码。
ListTileTheme(
iconColor: AppColors.green,
textColor: AppColors.green,
child: SimpleDialog(
shape:
RoundedRectangleBorder(
borderRadius:
BorderRadius
.circular(10),
),
title: Text(
"Select Restaurant",
style: Theme.of(context)
.textTheme
.headline3,
textAlign:
TextAlign.center,
),
children: [
Divider(),
RadioListTile(
title: const Text(
'Name and Address'),
value: 1,
groupValue:
_isRadioSelected,
onChanged: (v) {
setState(() {
_isRadioSelected =
v;
});
},
),
],
),
);
Run Code Online (Sandbox Code Playgroud)
小智 8
Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: Colors.green,
disabledColor: Colors.green
),
child: RadioListTile(
title: const Text('Name and Address'),
value: 1,
groupValue: _isRadioSelected,
onChanged: (v) {
setState(() {
_isRadioSelected = v;
});
},
),
)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5992 次 |
| 最近记录: |