Flutter RadioListTile 更改 Radio(图标)颜色

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)

使用 Theme 更改当前小部件中的某些主题参数。 在此输入图像描述