当我的应用程序启动时,一些数据将在后台加载我不希望用户在那时点击Drawer
图标,所以我做了类似的事情。
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Title'),
),
drawer: _isLoading ? null : HomeDrawer(),
body: _isLoading ? CircularProgressIndicator() : _body(),
);
}
在这种情况下,当应用程序加载抽屉按钮时不可见 qazxsw poi
我想要的是抽屉按钮应该在加载状态下可见,但它不应该是可点击的。