相关疑难解决方法(0)

颤动列表视图与无线电不显示在警报对话框中

这是代码。代码:

  class ThemeChangerWidget extends StatelessWidget {
  final List<String> string = ['Light', 'Dark', 'Amoled'];
  @override
  Widget build(BuildContext context) {
  final stateData = Provider.of<ThemeNotifier>(context);
  final ThemeData state = stateData.getTheme();

  return Theme(
  data: state.copyWith(unselectedWidgetColor: state.accentColor),
  child: AlertDialog(
      backgroundColor: state.primaryColor,
      shape:
          RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.0)),
      title: Text('Select Theme', style: state.textTheme.body1),
      content: ListView.builder(
        shrinkWrap: true,
        itemBuilder: (context, index) {
          return RadioListTile(
            value: index,
            groupValue: themes.indexOf(state),
            onChanged: (ind) {
              onThemeChanged(ind, stateData);
            },
            title: Text(
              string[index],
              style: state.textTheme.body2,
            ),
          );
        },
        itemCount: string.length,
      )),
      );
     }
     }'
Run Code Online (Sandbox Code Playgroud)

错误 - …

dart android-studio flutter

6
推荐指数
1
解决办法
4216
查看次数

标签 统计

android-studio ×1

dart ×1

flutter ×1