Future 请求就要用FutureBuilder这个组件
Future _getCartInfo(BuildContext context)async{
await Provide.value(context).getCartInfo();
}
body:FutureBuilder(
future:_getCartInfo(context) ,
builder: (context,snapshot){
if(snapshot.hasData){
}else{
return Text("正在加载中");
}
}
),