Is it possible to add buttons or text to the screen using the dropdownmenu selection to determine which buttons to display? I'm currently not getting anything displayed after the dropdowmenu. Do I need to refresh something? Thanks
const Page2({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
textTheme: TextTheme(
displayLarge: const TextStyle(
fontSize: 84, fontWeight: FontWeight.bold))),
home: Scaffold(
body: Center(
child: Column(children: <Widget>[
SizedBox(height: 50),
//children: [
DropdownMenu(
width: 200,
textStyle: TextStyle(fontSize: 14),
label: const Text('Session Options'),
inputDecorationTheme: InputDecorationTheme(
isDense: true,
contentPadding: const EdgeInsets.symmetric(horizontal: 5),
constraints: BoxConstraints.tight(const Size.fromHeight(40)),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
)),
onSelected: (value) {
debugPrint(value);
if (value == 'Create Session') {
Set<String> searchType = {'Interior'};
SegmentedButton(segments:<ButtonSegment<String>>[ButtonSegment<String>(
value:'Interior',label: Text('Interior')),], selected: searchType,);
}
},
dropdownMenuEntries: <DropdownMenuEntry<String>>[
DropdownMenuEntry(
value: 'Create Session', label: 'Create Session'),
DropdownMenuEntry(value: 'Edit Session', label: 'Edit Session'),
DropdownMenuEntry(
value: 'Delete Session', label: 'Delete Session'),
]
),
]
)
)
)
);
}
}```