Created
June 24, 2020 12:46
-
-
Save TheNova22/afabb25ce8e294a60504f45c69226ddc to your computer and use it in GitHub Desktop.
Radio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// vim: syntax=dart | |
<Widget>[ | |
Text( | |
'Which name would you finalise:', | |
), | |
ListTile( | |
title: Text(tname), | |
leading: Radio(value: NameSetter.presentName, groupValue: _pres, onChanged: (NameSetter val){ | |
setState(() { | |
_pres = val; | |
tname = name; | |
}); | |
}), | |
), | |
ListTile( | |
title: Text("Anonymous"), | |
leading: Radio(value: NameSetter.anonymous, groupValue: _pres, onChanged: (NameSetter val){ | |
setState(() { | |
_pres = val; | |
tname = "Anonymous"; | |
}); | |
}), | |
), | |
MaterialButton( | |
child: Text("Set"), | |
textColor: Colors.black, | |
color: fix, | |
onPressed: (){ | |
setState(() { | |
name = tname; | |
}); | |
}, | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment