我有一个课程页面,如下所示。用户在下拉菜单中进行选择后,我想在同一屏幕上显示一些其他按钮。为了保持课程简短,我试图将其他按钮显示在另一个课程中,但我不确定这样做是否允许。据我了解,每页应该只有 1 个布局。有人可以建议一种方法吗?谢谢
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),
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') {
debugPrint("Calling SessionEntryInfo");
SessionEntryInfo();
}
},
dropdownMenuEntries: <DropdownMenuEntry<String>>[
DropdownMenuEntry(
value: 'Create Session', label: 'Create Session'),
DropdownMenuEntry(value: 'Edit Session', label: 'Edit Session'),
DropdownMenuEntry(
value: 'Delete Session', label: 'Delete Session'),
]),
]))
)
);
}
}```