build method

  1. @override
Widget build(
  1. BuildContext context
)
override

Describes the part of the UI represented by this widget.

Implementation

@override
Widget build(BuildContext context) {
  final bar = SizedBox(width: width, child: sidebar);
  final spacer = gap > 0 ? SizedBox(width: gap) : SizedBox.shrink();
  return Row(
    gap: 0,
    children: side == SidebarSide.left
        ? [bar, spacer, Expanded(child: child)]
        : [Expanded(child: child), spacer, bar],
  );
}