buildDrawer function
Implementation
Widget buildDrawer({
required String id,
required Map<String, dynamic> props,
required List<Widget> children,
}) {
final title = props['title']?.toString() ?? 'Drawer';
return Material(
key: ValueKey(id),
elevation: 2,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(title),
if (children.isEmpty)
const SizedBox.shrink()
else if (children.length == 1)
children.first
else
Column(children: children),
],
),
);
}