Skip to content

Commit

Permalink
When there is just a close button, the product title card button shou…
Browse files Browse the repository at this point in the history
…ld not be 50/50 (#4404)
  • Loading branch information
g123k authored Jul 31, 2023
1 parent aa6dd01 commit f5a74c5
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ class ProductTitleCard extends StatelessWidget {

@override
Widget build(BuildContext context) {
Widget title = _ProductTitleCardTrailing(
removable: isRemovable,
selectable: isSelectable,
onRemove: onRemove,
);

if (!(isRemovable && !isSelectable)) {
title = Expanded(child: title);
}

return Provider<Product>.value(
value: product,
child: Align(
Expand All @@ -38,13 +48,7 @@ class ProductTitleCard extends StatelessWidget {
selectable: isSelectable,
),
),
Expanded(
child: _ProductTitleCardTrailing(
removable: isRemovable,
selectable: isSelectable,
onRemove: onRemove,
),
)
title,
],
),
_ProductTitleCardBrand(
Expand Down

0 comments on commit f5a74c5

Please sign in to comment.