Skip to content

Instantly share code, notes, and snippets.

View fayaz07's full-sized avatar
:octocat:
commit, rebase and merge

Mohammad Fayaz fayaz07

:octocat:
commit, rebase and merge
View GitHub Profile
import 'package:flutter/material.dart';
import 'package:progress_dialog/progress_dialog.dart';
ProgressDialog pr;
void main() {
runApp(MaterialApp(
home: FirstScreen(),
));
}
import 'package:flutter/material.dart';
import 'package:progress_dialog/progress_dialog.dart';
ProgressDialog pr;
void main() {
runApp(MaterialApp(
home: MyApp(),
));
}
import 'package:flutter/material.dart';
import 'package:progress_dialog/progress_dialog.dart';
ProgressDialog pr;
void main() {
runApp(MaterialApp(
home: MyApp(),
));
}
@fayaz07
fayaz07 / pubspec(ProgressDialog).yaml
Created September 13, 2019 20:14
Add the Package - Progress Dialog
dependencies:
progress_dialog: ^1.2.0
import 'package:progress_dialog/progress_dialog.dart';
ProgressDialog pr;
//Default
pr = new ProgressDialog(context);
//For normal dialog
pr = new ProgressDialog(context,type: ProgressDialogType.Normal, isDismissible: true/false, showLogs: true/false);
//For showing progress percentage
pr = new ProgressDialog(context,type: ProgressDialogType.Download, isDismissible: true/false, showLogs: true/false);
pr.style(
message: 'Downloading file...',
borderRadius: 10.0,
backgroundColor: Colors.white,
progressWidget: CircularProgressIndicator(),
elevation: 10.0,
insetAnimCurve: Curves.easeInOut,
progress: 0.0,
maxProgress: 100.0,
progressTextStyle: TextStyle(
pr.update(
progress: 50.0,
message: "Please wait...",
progressWidget: Container(
padding: EdgeInsets.all(8.0), child: CircularProgressIndicator()),
maxProgress: 100.0,
progressTextStyle: TextStyle(
color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400),
messageTextStyle: TextStyle(
color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600),
pr.hide().then((isHidden) {
print(isHidden);
});