progress_hud 1.1.0 copy "progress_hud: ^1.1.0" to clipboard
progress_hud: ^1.1.0 copied to clipboard

progress_hud is a clean and lightweight HUD meant to display the progress of an ongoing task on your Flutter app

progress_hud #

A clean and lightweight progress HUD for your Flutter app

https://pub.dartlang.org/packages/progress_hud

Example #

class _MyHomePageState extends State<MyHomePage> {
  ProgressHUD _progressHUD;

  bool _loading = true;

  @override
  void initState() {
    super.initState();

    _progressHUD = new ProgressHUD(
      backgroundColor: Colors.black12,
      color: Colors.white,
      containerColor: Colors.blue,
      borderRadius: 5.0,
      text: 'Loading...',
    );
  }

  @override
  Widget build(BuildContext context) {
    void dismissProgressHUD() {
      setState(() {
        if (_loading) {
          _progressHUD.state.dismiss();
        } else {
          _progressHUD.state.show();
        }

        _loading = !_loading;
      });
    }

    return new Scaffold(
        appBar: new AppBar(
          title: new Text('ProgressHUD Demo'),
        ),
        body: new Stack(
          children: <Widget>[
            new Text(
                'A clean and lightweight progress HUD for your Flutter app'),
            _progressHUD,
            new Positioned(
                child: new FlatButton(
                    onPressed: dismissProgressHUD,
                    child: new Text(_loading ? "Dismiss" : "Show")),
                bottom: 30.0,
                right: 10.0)
          ],
        ));
  }
}

Showcase #

10
likes
30
pub points
84%
popularity

Publisher

unverified uploader

progress_hud is a clean and lightweight HUD meant to display the progress of an ongoing task on your Flutter app

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on progress_hud