Skip to content

Commit

Permalink
fix: added space between button and label
Browse files Browse the repository at this point in the history
fix: constrained the width of the label to 100 so it wraps if it's too long. Let me know if you have a better solution that mine
  • Loading branch information
DE7924 committed Oct 4, 2024
1 parent 582c14a commit 7c185c8
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions lib/src/components/fabs/fab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,29 @@ class _ZetaFABState extends State<ZetaFAB> {
if (widget.expanded && widget.label != null)
Row(
mainAxisSize: MainAxisSize.min,
children: [Text(widget.label!, style: ZetaTextStyles.labelLarge)],
children: [
Text(
widget.label!,
style: ZetaTextStyles.labelLarge,
),
],
),
].divide(SizedBox(width: Zeta.of(context).spacing.small)).toList(),
),
),
),
),
if (!widget.expanded && widget.label != null) Text(widget.label!, style: ZetaTextStyles.bodyMedium),
if (!widget.expanded && widget.label != null)
Container(
margin: EdgeInsets.only(top: Zeta.of(context).spacing.minimum),
width: 100, // TODO DE: Is there a better way to do this?
alignment: Alignment.center,
child: Text(
widget.label!,
style: ZetaTextStyles.bodyMedium,
textAlign: TextAlign.center,
),
),
],
);
}
Expand Down

0 comments on commit 7c185c8

Please sign in to comment.