build method
dynamic
build( - dynamic context,
- dynamic ref
)
Implementation
@override
Widget build(BuildContext context, WidgetRef ref) {
final size = MediaQuery.of(context).size;
List<Widget> menu = [
const _MyUserAvatar(),
const Divider(indent: 18, endIndent: 18),
..._menuItems(context, ref),
];
if (size.height < 600) {
// we don’t have enough space to show more,
// only show our main menu
return SingleChildScrollView(
child: SizedBox(
width: 72,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
...menu,
if (isBugReportingEnabled) ..._bugReporter(context),
],
),
),
);
}
return SizedBox(
width: 72,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const _MyUserAvatar(),
const Divider(indent: 18, endIndent: 18),
..._menuItems(context, ref),
const Divider(indent: 18, endIndent: 18),
Expanded(
child: SingleChildScrollView(
child: Column(
children: _spacesList(context, ref),
),
),
),
if (isBugReportingEnabled) ..._bugReporter(context),
],
),
);
}