Skip to content

Commit

Permalink
Merge pull request #59 from Umigishi-Aoi/fix-bug-that-Rectangle-stick…
Browse files Browse the repository at this point in the history
…s-out-when-using-bordarRadius-and-gradient

Fix bug : Rectangle badge sticks out when using bordar Radius and gradient
  • Loading branch information
yadaniyil authored Jun 2, 2022
2 parents 430b060 + 3ddac2e commit 84e66bb
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions lib/src/badge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,16 @@ class BadgeState extends State<Badge> with SingleTickerProviderStateMixin {
shape: border,
elevation: widget.elevation,
child: Container(
decoration: BoxDecoration(
gradient: widget.gradient,
shape: widget.shape == BadgeShape.circle
? BoxShape.circle
: BoxShape.rectangle,
),
decoration: widget.shape == BadgeShape.circle
? BoxDecoration(
gradient: widget.gradient,
shape: BoxShape.circle,
)
: BoxDecoration(
gradient: widget.gradient,
shape: BoxShape.rectangle,
borderRadius: widget.borderRadius,
),
child: Padding(
padding: widget.padding,
child: widget.badgeContent,
Expand Down

0 comments on commit 84e66bb

Please sign in to comment.