📜  颤动单选按钮 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:36.253000             🧑  作者: Mango

代码示例2
// Outof class 
enum SingingCharacter { lafayette, jefferson }

// declare object
SingingCharacter? _character = SingingCharacter.lafayette;
 
Radio(
                    value: SingingCharacter.lafayette,
                    groupValue: _character,
                    onChanged: (SingingCharacter? value) {
                      setState(() {
                        _character = value;
                      }
                      );
                    },
                  ),