build method

  1. @override
Widget build(
  1. BuildContext context,
  2. int index,
  3. int itemCount
)
override

Implementation

@override
Widget build(BuildContext context, int index, int itemCount) {
  return Stack(
    children: [
      Positioned(
        child: Wrap(
          children: [
            Container(
              alignment: Alignment.center,
              padding: EdgeInsets.only(left: 4, top: 2, right: 4, bottom: 2),
              constraints: BoxConstraints(minWidth: minWidth, minHeight: minHeight),
              decoration: BoxDecoration(
                color: backgroundColor,
                borderRadius: BorderRadius.all(Radius.circular(2)),
              ),
              child: Text(
                "${index + 1}/$itemCount",
                style: TextStyle(color: textColor, fontSize: 12),
              ),
            )
          ],
        ),
        right: 16,
        bottom: 16,
      )
    ],
  );
}