Environment
Package version: 3.2.0
Platform: Web
Device information: Chrome on Windows 11
Flutter: Flutter version 3.44.1 on channel stable
Description
Condition: The following attributes of badge are set:
onTap is not null [but is set to an empty function as () {}]
ignorePointer is false (left as default)
position is set to -20 for bottom and a positive number for end
badgeContent is a Text widget
child is a Card widget
Expected behavior: Badge is correctly displayed slightly below card, clicks to badge trigger onTap method, and no additional padding from the bottom of the badge is added after the child of the badge
Current behavior: Badge is correctly displayed slightly below card, clicks to badge trigger onTap method, however an additional padding from the bottom of the badge is added is added
In Line 38 of utils/calculation_utils.dart:
getUpdatedPadding method adds an additional 20 points of padding below the badge
Steps to reproduce
My code is like this:
badges.Badge(
onTap: isBadgeVisible ? () {} : null,
showBadge: isBadgeVisible,
badgeContent: isBadgeVisible ?
Tooltip(
triggerMode: TooltipTriggerMode.tap,
message: 'Some tooltip',
child: Text(
'abc',
softWrap: false,
)
) :
Text(''),
position: badges.BadgePosition.bottomEnd(bottom: -20, end: 16),
badgeStyle: badges.BadgeStyle(
shape: badges.BadgeShape.square,
borderRadius: BorderRadius.circular(12),
badgeColor: Colors.white,
padding: EdgeInsets.all(4)
),
child: Card(...
Images
Current behavior:

Expected behavior:

Environment
Package version: 3.2.0
Platform: Web
Device information: Chrome on Windows 11
Flutter: Flutter version 3.44.1 on channel stable
Description
Condition: The following attributes of badge are set:
onTap is not null [but is set to an empty function as () {}]
ignorePointer is false (left as default)
position is set to -20 for bottom and a positive number for end
badgeContent is a Text widget
child is a Card widget
Expected behavior: Badge is correctly displayed slightly below card, clicks to badge trigger onTap method, and no additional padding from the bottom of the badge is added after the child of the badge
Current behavior: Badge is correctly displayed slightly below card, clicks to badge trigger onTap method, however an additional padding from the bottom of the badge is added is added
In Line 38 of utils/calculation_utils.dart:
getUpdatedPadding method adds an additional 20 points of padding below the badge
Steps to reproduce
My code is like this:
Images
Current behavior:

Expected behavior:
