void _onLoading() {
showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return Dialog(
child: new Row(
mainAxisSize: MainAxisSize.min,
children: [
new CircularProgressIndicator(),
new Text("Loading"),
],
),
);
},
);
}
_onLoading();
instaprofile result = await getProfile(user.user!.username.toString());
Navigator.pop(context);
Navigator.push(
context,
MaterialPageRoute(builder: (context) => ProfilePage(userbio:result)),
);
您好,我正在嘗試顯示“正在加載”螢屏。但我無法關閉它。謝謝你的幫助。我知道我在做什么可能不對。我正在嘗試學習。
uj5u.com熱心網友回復:
嘗試更換
Navigator.pop(context);
有了這個:
Navigator.of(context, rootNavigator: true).pop();
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/537195.html
標籤:扑镖
