我需要在进度条Web视图中加载URL之前显示进度指示器,并在加载内容后隐藏它。
Something like this in build
method of your state
Widget build(BuildContext context) => FutureBuilder<YourData>(
future: doRequest(),
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
... /* return widget with data from network response */
} else {
return Center(child: CircularProgressIndicator());
}
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.