Skip to content

Commit 84e66bb

Browse files
authored
Merge pull request #59 from Umigishi-Aoi/fix-bug-that-Rectangle-sticks-out-when-using-bordarRadius-and-gradient
Fix bug : Rectangle badge sticks out when using bordar Radius and gradient
2 parents 430b060 + 3ddac2e commit 84e66bb

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

lib/src/badge.dart

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,16 @@ class BadgeState extends State<Badge> with SingleTickerProviderStateMixin {
227227
shape: border,
228228
elevation: widget.elevation,
229229
child: Container(
230-
decoration: BoxDecoration(
231-
gradient: widget.gradient,
232-
shape: widget.shape == BadgeShape.circle
233-
? BoxShape.circle
234-
: BoxShape.rectangle,
235-
),
230+
decoration: widget.shape == BadgeShape.circle
231+
? BoxDecoration(
232+
gradient: widget.gradient,
233+
shape: BoxShape.circle,
234+
)
235+
: BoxDecoration(
236+
gradient: widget.gradient,
237+
shape: BoxShape.rectangle,
238+
borderRadius: widget.borderRadius,
239+
),
236240
child: Padding(
237241
padding: widget.padding,
238242
child: widget.badgeContent,

0 commit comments

Comments
 (0)