build method
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,
);
}