Skip to content

Commit

Permalink
Increase padding for attribute groups (#4357)
Browse files Browse the repository at this point in the history
  • Loading branch information
g123k authored Aug 3, 2023
1 parent de1fdb3 commit 7fe073e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 26 deletions.
47 changes: 28 additions & 19 deletions packages/smooth_app/lib/pages/product/summary_attribute_group.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,30 @@ class SummaryAttributeGroup extends StatelessWidget {
final String? groupName;

@override
Widget build(BuildContext context) => AbsorbPointer(
absorbing: !isClickable,
child: Column(
children: <Widget>[
_SummaryAttributeGroupHeader(
isFirstGroup: isFirstGroup,
groupName: groupName,
),
Container(
alignment: AlignmentDirectional.topStart,
child: Wrap(
runSpacing: 16,
children: attributeChips,
),
),
],
),
);
Widget build(BuildContext context) {
return AbsorbPointer(
absorbing: !isClickable,
child: Column(
children: <Widget>[
_SummaryAttributeGroupHeader(
isFirstGroup: isFirstGroup,
groupName: groupName,
),
Align(
alignment: AlignmentDirectional.topStart,
child: attributeChips.length == 1
? SizedBox(
width: double.infinity,
child: attributeChips.first,
)
: Wrap(
children: attributeChips,
),
),
],
),
);
}
}

class _SummaryAttributeGroupHeader extends StatelessWidget {
Expand Down Expand Up @@ -62,7 +68,10 @@ class _SummaryAttributeGroupHeader extends StatelessWidget {
),
)
: Padding(
padding: const EdgeInsets.symmetric(vertical: SMALL_SPACE),
padding: const EdgeInsetsDirectional.only(
top: VERY_SMALL_SPACE,
bottom: SMALL_SPACE,
),
child: isFirstGroup
? EMPTY_WIDGET
: const Divider(
Expand Down
18 changes: 11 additions & 7 deletions packages/smooth_app/lib/pages/product/summary_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -431,17 +431,21 @@ class _SummaryCardState extends State<SummaryCard> with UpToDateMixin {
return SizedBox(
width: constraints.maxWidth / 2,
child: InkWell(
borderRadius: ANGULAR_BORDER_RADIUS,
enableFeedback: _isAttributeOpeningAllowed(attribute),
onTap: () async => _openFullKnowledgePanel(
attribute: attribute,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
attributeIcon,
Expanded(child: Text(attributeDisplayTitle)),
],
child: Padding(
padding: const EdgeInsets.symmetric(vertical: SMALL_SPACE),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
attributeIcon,
Expanded(child: Text(attributeDisplayTitle)),
],
),
),
),
);
Expand Down

0 comments on commit 7fe073e

Please sign in to comment.