Badge constructor

const Badge(
  1. {Key? key,
  2. Color? backgroundColor,
  3. Color? textColor,
  4. double? smallSize,
  5. double? largeSize,
  6. TextStyle? textStyle,
  7. EdgeInsetsGeometry? padding,
  8. AlignmentGeometry? alignment,
  9. Offset? offset,
  10. Widget? label,
  11. bool isLabelVisible = true,
  12. Widget? child}
)

Create a Badge that stacks label on top of child.

If label is null then just a filled circle is displayed. Otherwise the label is displayed within a StadiumBorder shaped area.

Implementation

const Badge({
  super.key,
  this.backgroundColor,
  this.textColor,
  this.smallSize,
  this.largeSize,
  this.textStyle,
  this.padding,
  this.alignment,
  this.offset,
  this.label,
  this.isLabelVisible = true,
  this.child,
});