1. async await 쓰다보면 데이타 오기전에 페이지가 안 뜨게 할때가 있다.
Widget build(BuildContext context){
if(){
return Text("본문")
...
} else{
return CircularProgressIndicator();
}
}
var result2=jsonDecode(result.body);
if (result.statusCode==200){
setState(() {
data=result2;
});
} else{
setState(() {
data=[];
});
}
FutureBuilder(future:data,builder:(){
})