-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hi,
I would like to know if there's a way to use generic typed widget in xml? e.g., how to rewrite the following code in xml? where RadioListTile is a generic typed widget.
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
RadioListTile<SingingCharacter>(
title: const Text('Lafayette'),
value: SingingCharacter.lafayette,
groupValue: _character,
onChanged: (SingingCharacter? value) {
setState(() {
_character = value;
});
},
),
RadioListTile<SingingCharacter>(
title: const Text('Thomas Jefferson'),
value: SingingCharacter.jefferson,
groupValue: _character,
onChanged: (SingingCharacter? value) {
setState(() {
_character = value;
});
},
),
],
);
}
and moreover, is there a way to define new generic typed widget like RadioListTile in xml?
Appreciate for any info help.
-James
Metadata
Metadata
Assignees
Labels
No labels