json - 在同一屏幕上加载许多 json,如何等待一个并继续?
问题描述
我有一个带有多个 json 请求的屏幕,但它是同时加载的,我想什么时候finish one start the another
到最后。
new CustomScrollView(
cacheExtent: height * 5,
slivers: [
new SliverList(
delegate: new SliverChildListDelegate(
[
new RelatorioVendPeriodoAPeriodo(),
new RelatorioDiasDaSemanas(),
new RelatorioVendasTotalidasPorPeriodo(),
new RelatorioDasVendasTotsProdutos(),
new RelatorioMensals(),
]
)
)
]
),
这个类加载一个json请求,如何划分并等待一个开始另一个?
这是此类返回方法之一:
Widget build(BuildContext context) {
double height = (MediaQuery.of(context).size.height) - kRadialReactionRadius - kToolbarHeight;
return new Container(
height: height,
padding: new EdgeInsets.only(left: 5.0, right: 5.0),
child: new Card(
elevation: 10.0,
child:
new Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
new Column(crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
new ListTile(
trailing:
_buildCounterButton(),
title: new Center(child: new Text('FATURAMENTO MENSAL', style: new TextStyle(fontWeight: FontWeight.bold))),
subtitle: new Icon(Icons.info),
onTap: _showDialog,
),
new FutureBuilder<List<RelatorioMensal>>(
future: fetchRelatorioMensal(new http.Client(), "", '$dateFinal1Sem'),
builder: (context, snapshot) {
if (snapshot.hasError) print(snapshot.error);
return snapshot.hasData
? new porVendaMensal(listVendasMensais: snapshot.data,)
: new Center(child: new CircularProgressIndicator());
}
),
],),]
),
),
);
}
解决方案
推荐阅读
- javascript - 通过输入另一个表的值来触发一个表
- webhooks - 通过 microsoft Teams 与远程服务器通信
- c# - ASP.NET Core 3.1 实体框架存在查询持续时间
- javascript - If Else 语句中断,因为变量并不总是存在
- appdelegate - 在场景外配置 UIViewController(_:willConnectTo:options:) 然后将其设置为窗口 rootViewController 不起作用
- firebase - “String”类型不是“double”类型的子类型
- python - Pyspark DataframeType 错误 a:DoubleType 不能接受类型中的对象“a”
- c++ - 该对象具有与成员函数“SimpleCircle::GetRadius”不兼容的类型限定符
- azure-ad-b2c - 如何限制 Azure B2C 验证电子邮件的数量
- c# - AWS Elasticsearch C# 开发工具包 AWSSDK.Elasticsearch