From 7eaa879ff43995b49969b9d2b5bc60d6dc2548e8 Mon Sep 17 00:00:00 2001 From: yaso Date: Tue, 1 Oct 2024 14:07:21 +0200 Subject: [PATCH] check number of items for alingment --- .../mih_components/mih_layout/mih_layout_builder.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Frontend/patient_manager/lib/mih_components/mih_layout/mih_layout_builder.dart b/Frontend/patient_manager/lib/mih_components/mih_layout/mih_layout_builder.dart index d6a0c42b..aeedba10 100644 --- a/Frontend/patient_manager/lib/mih_components/mih_layout/mih_layout_builder.dart +++ b/Frontend/patient_manager/lib/mih_components/mih_layout/mih_layout_builder.dart @@ -48,9 +48,12 @@ class _MIHLayoutBuilderState extends State { if (widget.secondaryActionButton != null) { temp.add(widget.secondaryActionButton!); } else { - temp.add(const SizedBox( - width: 50, - )); + print(widget.header.headerItems.length); + if (widget.header.headerItems.length == 1) { + temp.add(const SizedBox( + width: 50, + )); + } } return Row( mainAxisSize: MainAxisSize.min,