progress_alert 0.0.1 progress_alert: ^0.0.1 copied to clipboard
A new Flutter package project.
progress_alert #
Progress Alert is customizable alert for showing process which is progressing in background
Features #
- Single line basic alert
- Customizable Features
- Change all button texts
- Change height
- Change position as top/bottom
- Change icons
- Change all button texts
Getting started #
You must add the library as a dependency to your project.
dependencies:
progress_alert: ^latest
Then run flutter packages get
Example Project #
There is a detailed example project in the example
folder. You can directly run and play on it. There are code snippets from example project below.
Basic Setup #
Add ProgressAlert() to Material App's builder as example
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
builder: (context, child) => Stack(
children: [child!, ProgressAlert()],
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
Start controller
final controller = Get.put(ProgressController());
Create progress
ProgressItem progress = ProgressItem(
process: func,
processText: "Counter Incrementing",
errorText: "Counter Incrementing Failed!",
onCancel: () {
print("Progress Cancelled");
},
onDone: () {
print("Progress Done");
},
onError: (e) {
print("Progress Failed:$e");
});
Add and start process
controller.addProcess(progress);
Customizable Features #
ProgressAlert
ProgressAlert(
redoText: "Redi",
height: 50,
hideText: "Hide",
cancelText: "Cancel",
errorIcon: const Icon(Icons.error),
progressIcon: const CircularProgressIndicator(),
isTop: true,
)
ProgressItem
ProgressItem progress = ProgressItem(
process: func,
processText: "Counter Incrementing",
errorText: "Counter Incrementing Failed!",
onCancel: () {
print("Progress Cancelled");
},
onDone: () {
print("Progress Done");
},
onError: (e) {
print("Progress Failed:$e");
});
Contributions #
- If you found a bug, open an issue.
- If you have a feature request, open an issue.
- If you want to contribute, submit a pull request.