view method
Display your widget.
Implementation
@override
Widget view(BuildContext context) {
if (_alertEnabled == false) {
return widget.icon ?? SizedBox.shrink();
}
return Badge(
backgroundColor: widget.alertColor,
textColor: widget.textColor,
smallSize: widget.smallSize,
largeSize: widget.largeSize,
textStyle: widget.textStyle,
padding: widget.padding,
alignment: widget.alignment,
isLabelVisible: widget.isLabelVisible ?? true,
child: widget.icon,
);
}