Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- children: <Widget>[
- FormBuilder(
- key: _fbKey,
- autovalidate: true,
- child: Column(
- children: <Widget>[
- FormBuilderDropdown(
- attribute: "value",
- decoration: InputDecoration(
- labelText: "Choose something?"),
- hint: Text('Select Option'),
- validators: [FormBuilderValidators.required()],
- items: user.option.map((v) {
- return DropdownMenuItem(
- value: v,
- child: ListTile(
- leading: Image.asset(
- 'assets/img/image.png',
- width: 50,
- height: 50,
- ),
- title: Text("${v.option}"),
- ));
- }).toList(),
- ),
- ],
- ),
- // if v.option == "A" is selected here build Widget A()
- // if v.option == "B" is selected here build Widget B()
- // if v.option == "C" is selected here build Widget C()
- ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement