buttonQtyLeading method

Widget buttonQtyLeading(
  1. BuildContext context,
  2. int? qty
)

Implementation

Widget buttonQtyLeading(
  BuildContext context,
  int? qty,
) {
  return qty! > 0
      ? Container(
          decoration: BoxDecoration(
            color: Theme.of(context)
                .textTheme
                .bodyMedium!
                .color!
                .withOpacity(0.2),
            borderRadius: BorderRadius.all(
                Radius.circular(DUI.spacing.smallBorderRadius)),
          ),
          padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 8),
          child: DUI.text.title3(context, qty.toString(),
              color: Theme.of(context).colorScheme.onPrimary),
        )
      : const SizedBox.shrink();
}