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 Container(
    decoration: BoxDecoration(
      color: Colors.black45,
      borderRadius: BorderRadius.circular(20.0),
    ),
    margin: const EdgeInsets.only(top: 10.0, right: 5.0),
    padding: const EdgeInsets.symmetric(horizontal: 6.0, vertical: 2.0),
    child: Text(
      "${++index}/$itemCount",
      style: const TextStyle(color: Colors.white70, fontSize: 11.0),
    ),
  );
}