progress_dialog 0.0.1 copy "progress_dialog: ^0.0.1" to clipboard
progress_dialog: ^0.0.1 copied to clipboard

discontinued
outdated

A light weight package to show progress dialog

progress_dialog #

A light weight package to show progress dialog

How to use #

Import the package

import 'package:progress_dialog/progress_dialog.dart';

Create an instance of ProgressDialog

ProgressDialog pr;

Initialise the pr object inside the build() method passing context to it

pr = new ProgressDialog(context);

If need you can change the default message of progress dialog

pr.setMessage('Please wait...');

Showing the progress dialog

pr.show();

Dismissing the progress dialog

pr.hide();

Demo #

Simple App Intro Demo

Complete Example #

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

ProgressDialog pr;

void main(){
  runApp(
    MaterialApp(
      home: MyApp(),
    )
  );
}

class MyApp extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    pr = new ProgressDialog(context);
    pr.setMessage('Please wait...');
    return Scaffold(
      body: Center(
        child: RaisedButton(
            child: Text('Show Dialog',style: TextStyle(color: Colors.white),),
            color: Colors.blue,
            onPressed: (){
          pr.show();
          Future.delayed(Duration(seconds: 3)).whenComplete((){
            pr.hide();
          });
        }),import 'common/loading_bar.dart';
import 'package:flutter/material.dart';

ProgressDialog pr;

void main(){
  runApp(
    MaterialApp(
      home: MyApp(),
    )
  );
}

class MyApp extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    pr = new ProgressDialog(context);
    pr.setMessage('Please wait...');
    return Scaffold(
      body: Center(
        child: RaisedButton(
            child: Text('Show Dialog',style: TextStyle(color: Colors.white),),
            color: Colors.blue,
            onPressed: (){
          pr.show();
          Future.delayed(Duration(seconds: 3)).whenComplete((){
            pr.hide();
          });
        }),
      ),
    );
  }
}
      ),
    );
  }
}
239
likes
20
pub points
95%
popularity

Publisher

unverified uploader

A light weight package to show progress dialog

Repository (GitHub)
View/report issues
Contributing

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on progress_dialog