Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

flutter radio button

// Outof class 
enum SingingCharacter { lafayette, jefferson }

// declare object
SingingCharacter? _character = SingingCharacter.lafayette;
 
Radio<SingingCharacter>(
                    value: SingingCharacter.lafayette,
                    groupValue: _character,
                    onChanged: (SingingCharacter? value) {
                      setState(() {
                        _character = value;
                      }
                      );
                    },
                  ),
                  
                  
     
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flutter #radio #button
ADD COMMENT
Topic
Name
8+3 =