UiDrawer.compact constructor
UiDrawer.compact({})
Compact variant (minimalist, no background color in header)
Implementation
factory UiDrawer.compact({
Key? key,
required String title,
String? subtitle,
Widget? avatar,
required List<Widget> items,
Widget? footer,
}) {
return UiDrawer(
key: key,
items: items,
footer: footer,
header: Padding(
padding: const EdgeInsets.all(16),
child: Row(
children: [
avatar ??
const CircleAvatar(
radius: 24,
child: Icon(Icons.person, size: 28),
),
const SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
if (subtitle != null)
Text(
subtitle,
style: const TextStyle(fontSize: 13, color: Colors.grey),
),
],
),
),
],
),
),
);
}