simpleprogressdialog 1.0.7

  • Readme
  • Changelog
  • Example
  • Installing
  • 74

simpleprogressdialog #

Simple Progress Dialog is an open source package with a customizable and easy to use and tweak Progress Dialog

Widgets #

  • ProgressDialog - Creates a Progress Dialog for you

Example #

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:simpleprogressdialog/cupertino_dialog_builder.dart';
import 'package:simpleprogressdialog/material_dialog_builder.dart';
import 'package:simpleprogressdialog/simpleprogressdialog.dart';

// ignore: must_be_immutable
class Home extends StatelessWidget {

  ProgressDialog dialog = ProgressDialog(barrierDismissible: false, elevation: 10.0);
  
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              FlatButton(
                onPressed: () {
                  dialog.showMaterial(
                    message: "The message",
                    title: "The title",
                    centerTitle: true,
                    layout: MaterialProgressDialogLayout.columnReveredWithCircularProgressIndicator,
                    messageStyle: TextStyle(color: Colors.green[900]),
                  );
                  dismiss();
                },
                child: Text("Show Material Dialog"),
              ),
              FlatButton(
                onPressed: () {
                  dialog.showCupertino(
                    message: "The message",
                    title: "The title",
                    centerTitle: true,
                    backgroundColor: Colors.blue,
                    layout: CupertinoProgressDialogLayout.columnWithCircularActivityIndicator,
                    messageStyle: TextStyle(color: Colors.black, fontFamily: 'Montserrat'),
                    titleStyle: TextStyle(
                      color: Colors.red[900],
                      fontSize: 15,
                      fontFamily: 'Montserrat',
                      fontWeight: FontWeight.bold,
                    ),
                  );
                  dismiss();
                },
                child: Text("Show Cupertino Dialog"),
              ),
              FlatButton(
                onPressed: () {
                  dialog.showAdaptive(
                    message: "The message",
                    title: "The title",
                    centerTitle: true,
                    layoutForIOS: CupertinoProgressDialogLayout.columnReveredWithCircularActivityIndicator,
                    layoutForAndroid: MaterialProgressDialogLayout.columnReveredWithCircularProgressIndicator,
                    messageStyle: TextStyle(color: Colors.green[900], fontFamily: 'Montserrat'),
                    titleStyle: TextStyle(
                      color: Colors.green[900],
                      fontFamily: 'Montserrat',
                      fontWeight: FontWeight.w300,
                    ),
                  );
                  dismiss();
                },
                child: Text("Show Adaptive Dialog"),
              ),
            ],
          ),
        ),
      ),
    );
  }

  void dismiss(){
    Timer(Duration(seconds: 3), (){dialog.dismiss();});
  }
}

Contributors #

Josteve Adekanbi

Changelog #

1.0.0 #

Package initialization

  • Includes ProgressDialog - That creates the progress dialog.
  • Includes ProgressDialogLayout - That allows the specification of Progress Dialog layout.

1.0.1 #

Package initialization

  • Example maintained.

1.0.2 #

Package initialization

  • Route Settings removed.

1.0.3 #

Package initialization

  • Readme edit.

1.0.4 #

Package initialization

  • Readme edit.

1.0.5 #

Package initialization

  • Bug fixes.

1.0.6 #

Package updates

  • Includes ProgressDialog - That creates the progress dialog.
  • Includes MaterialProgressDialogLayout - That allows the specification of Material Progress Dialog layout.
  • Includes CupertinoProgressDialogLayout - That allows the specification of Material Progress Dialog layout.

1.0.7 #

Package updates

  • Readme edit.

example/main.dart

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:simpleprogressdialog/cupertino_dialog_builder.dart';
import 'package:simpleprogressdialog/material_dialog_builder.dart';
import 'package:simpleprogressdialog/simpleprogressdialog.dart';

// ignore: must_be_immutable
class Home extends StatelessWidget {

  ProgressDialog dialog = ProgressDialog(barrierDismissible: false, elevation: 10.0);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              FlatButton(
                onPressed: () {
                  dialog.showMaterial(
                    message: "The message",
                    title: "The title",
                    centerTitle: true,
                    layout: MaterialProgressDialogLayout.columnReveredWithCircularProgressIndicator,
                    messageStyle: TextStyle(color: Colors.green[900]),
                  );
                  dismiss();
                },
                child: Text("Show Material Dialog"),
              ),
              FlatButton(
                onPressed: () {
                  dialog.showCupertino(
                    message: "The message",
                    title: "The title",
                    centerTitle: true,
                    backgroundColor: Colors.blue,
                    layout: CupertinoProgressDialogLayout.columnWithCircularActivityIndicator,
                    messageStyle: TextStyle(color: Colors.black, fontFamily: 'Montserrat'),
                    titleStyle: TextStyle(
                      color: Colors.red[900],
                      fontSize: 15,
                      fontFamily: 'Montserrat',
                      fontWeight: FontWeight.bold,
                    ),
                  );
                  dismiss();
                },
                child: Text("Show Cupertino Dialog"),
              ),
              FlatButton(
                onPressed: () {
                  dialog.showAdaptive(
                    message: "The message",
                    title: "The title",
                    centerTitle: true,
                    layoutForIOS: CupertinoProgressDialogLayout.columnReveredWithCircularActivityIndicator,
                    layoutForAndroid: MaterialProgressDialogLayout.columnReveredWithCircularProgressIndicator,
                    messageStyle: TextStyle(color: Colors.green[900], fontFamily: 'Montserrat'),
                    titleStyle: TextStyle(
                      color: Colors.green[900],
                      fontFamily: 'Montserrat',
                      fontWeight: FontWeight.w300,
                    ),
                  );
                  dismiss();
                },
                child: Text("Show Adaptive Dialog"),
              ),
            ],
          ),
        ),
      ),
    );
  }

  void dismiss(){
    Timer(Duration(seconds: 3), (){dialog.dismiss();});
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  simpleprogressdialog: ^1.0.7

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:simpleprogressdialog/simpleprogressdialog.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
48
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
74
Learn more about scoring.

We analyzed this package on Jul 11, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

Because:

  • simpleprogressdialog that is a package requiring null.

Package not compatible with runtime flutter-web on web

Because:

  • package:simpleprogressdialog/simpleprogressdialog.dart that imports:
  • dart:io

Health suggestions

Format lib/cupertino_dialog_builder.dart.

Run flutter format to format lib/cupertino_dialog_builder.dart.

Format lib/dialog_builder.dart.

Run flutter format to format lib/dialog_builder.dart.

Format lib/material_dialog_builder.dart.

Run flutter format to format lib/material_dialog_builder.dart.

Format lib/simpleprogressdialog.dart.

Run flutter format to format lib/simpleprogressdialog.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test