I have a case where I am using FutureBuilder
and while loading I am showing my CircularProgressIndicator
. Now I want to set a value to the loader but I don't have one and I don't really have any way of knowing how much time will it take to complete the future. My current code is something like this:
FutureBuilder(
future: getSoilData(context),
builder: (BuildContext context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
return makeBody();
}
return LoadingBar();
},
),
So how do I set the value to my progress bar so that the user gets an idea of how much more time the loader is going to take.