Skip to content

Commit

Permalink
Merge pull request #23 from royibernthal/master
Browse files Browse the repository at this point in the history
Ignore pointer option
  • Loading branch information
yadaniyil authored Oct 23, 2020
2 parents 742a454 + c704711 commit b79593e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/badge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Badge extends StatefulWidget {
final AlignmentGeometry alignment;
final BadgeAnimationType animationType;
final bool showBadge;
final bool ignorePointer;

Badge({
Key key,
Expand All @@ -34,6 +35,7 @@ class Badge extends StatefulWidget {
this.alignment = Alignment.center,
this.animationType = BadgeAnimationType.slide,
this.showBadge = true,
this.ignorePointer = false
}) : super(key: key);

@override
Expand Down Expand Up @@ -85,7 +87,7 @@ class BadgeState extends State<Badge> with SingleTickerProviderStateMixin {
widget.child,
BadgePositioned(
position: widget.position,
child: _getBadge(),
child: widget.ignorePointer ? IgnorePointer(child: _getBadge()) : _getBadge(),
),
],
);
Expand Down

0 comments on commit b79593e

Please sign in to comment.