The issue is that It is showing on all except for only one index
Asked
Active
Viewed 29 times
-2

zain ishfaq
- 105
- 1
- 7
-
Can you include what you’ve tried so far? – Md. Yeasin Sheikh Feb 02 '22 at 09:27
-
Just added the Progress bar in the Girdview using stack and now I want to show the loading bar on a specific index. – zain ishfaq Feb 02 '22 at 09:38
-
Can you include your gridView? – Md. Yeasin Sheikh Feb 02 '22 at 09:44
1 Answers
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