-2

enter image description here

The issue is that It is showing on all except for only one index

zain ishfaq
  • 105
  • 1
  • 7

1 Answers1

1

While showing CircularProgressIndicator you can use condition, like

 Widget item({
    required bool showProgressBar,
  }) {
    return Stack(
      children: [
        /// item widgets
        if (showProgressBar) const CircularProgressIndicator(),
      ],
    );
  }

And On GridView's

child: GridView.count(
  crossAxisCount: 2,
  children: List.generate(
    totalItemLength,
    (index) => item(showProgressBar: sepecifiqIndex == index),
  ),
),
Md. Yeasin Sheikh
  • 54,221
  • 7
  • 29
  • 56