flutter_progress_hud 2.0.1 copy "flutter_progress_hud: ^2.0.1" to clipboard
flutter_progress_hud: ^2.0.1 copied to clipboard

Highly customizable modal progress indicator with fade animation.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_progress_hud/flutter_progress_hud.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Progress HUD',
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Progress HUD'),
      ),
      body: ProgressHUD(
        child: Builder(
          builder: (context) => Center(
                child: Column(
                  children: <Widget>[
                    ElevatedButton(
                      child: Text('Show for a second'),
                      onPressed: () {
                        final progress = ProgressHUD.of(context);
                        progress?.show();
                        Future.delayed(Duration(seconds: 1), () {
                          progress?.dismiss();
                        });
                      },
                    ),
                    ElevatedButton(
                      child: Text('Show with text'),
                      onPressed: () {
                        final progress = ProgressHUD.of(context);
                        progress?.showWithText('Loading...');
                        Future.delayed(Duration(seconds: 1), () {
                          progress?.dismiss();
                        });
                      },
                    ),
                  ],
                ),
              ),
        ),
      ),
    );
  }
}
129
likes
140
pub points
95%
popularity

Publisher

unverified uploader

Highly customizable modal progress indicator with fade animation.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_progress_hud