Skip to content

Commit

Permalink
TabButton: change layout to better fit icons
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnurmi committed Sep 22, 2022
1 parent 3e6421a commit 47b5dcd
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions packages/movable_tabs/lib/src/tab_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 47b5dcd

Please sign in to comment.