build method

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

Implementation

@override
Widget build(BuildContext context) {
  final children = <Widget>[];
  if (left != null) {
    children.add(left!);
  }
  children.add(const Spacer());
  if (center != null) {
    children.add(center!);
  }
  children.add(const Spacer());
  if (right != null) {
    children.add(right!);
  }

  Widget row = Row(children: children);

  if (foregroundColor != null) {
    row = DefaultTextStyle(
      style: TextStyle(color: foregroundColor),
      child: row,
    );
  }

  return Container(
    height: height,
    color: backgroundColor ?? Color.blue,
    child: row,
  );
}