ProgressHUD( child: Builder( builder: (context) => Center( child: Column( children: <Widget>[ RaisedButton( child: Text('Show for a second'), onPressed: () { final progress = ProgressHUD.of(context); progress.show(); Future.delayed(Duration(seconds: 1), () { progress.dismiss(); }); }, ), RaisedButton( child: Text('Show with text'), onPressed: () { final progress = ProgressHUD.of(context); progress.showWithText('Loading...'); Future.delayed(Duration(seconds: 1), () { progress.dismiss(); }); }, ), ], ), ), ), ),
Flutter 一个高度可定制的模式进度指示器与淡出动画 loading 组件
9 min read