From 47b5dcd4427b47e436c19c3c34d1edd47bc10224 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 22 Sep 2022 18:12:04 +0200 Subject: [PATCH] TabButton: change layout to better fit icons --- packages/movable_tabs/lib/src/tab_button.dart | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/packages/movable_tabs/lib/src/tab_button.dart b/packages/movable_tabs/lib/src/tab_button.dart index c81058fd..bf384353 100644 --- a/packages/movable_tabs/lib/src/tab_button.dart +++ b/packages/movable_tabs/lib/src/tab_button.dart @@ -51,21 +51,23 @@ class MovableTabButton extends StatelessWidget { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - if (icon != null) - Padding( - padding: const EdgeInsets.all(8), - child: icon!, + Padding( + padding: const EdgeInsetsDirectional.only( + start: 8, + top: 8, + bottom: 8, ), - if (label != null) - Expanded( - child: Padding( - padding: const EdgeInsets.all(8), - child: Align( - alignment: Alignment.center, - child: label!, - ), + child: icon, + ), + Expanded( + child: Padding( + padding: const EdgeInsets.all(8), + child: Align( + alignment: Alignment.centerLeft, + child: label!, ), ), + ), if (onClosed != null) Padding( padding: const EdgeInsets.all(8),