load_toast 1.0.0 load_toast: ^1.0.0 copied to clipboard
A plugin that would really help you show some cool animated widget, describing your app is busy.
load_toast #
A plugin that would really help you show some cool animated widget, describing your app is busy.
How does it look like #
Supported Dart Versions #
Dart SDK version >=2.1.0 <3.0.0
Installation #
Add the Package
dependencies:
load_toast: ^0.0.1
How to use #
Import the package in your dart file
import 'package:load_toast/load_toast.dart';
Create an instance of it, maybe a static variable widget can really help as it would be an optimized choice. Wrap it in a MaterialApp->Stack->[YourApp(), loadtoast]
Create an instance of LoadToast
LoadToast loadToast = LoadToast();
You can specify the optional parameters to the above constructor, backgroundColor: Colors.greenAccent, circularIndicatorColor: Colors.white
Plug it into your widget tree in a Stack parent
Widget build(BuildContext context) {
return Scaffold(
body: Stack(children: <Widget>[
//... your children
loadToast
]));
}
That's it, you're done, lets show it
loadToast.show();
Note: You can specify the optional parameter to the above method, text: "Hello there!"
Handle the cases now
- The operation ended up in Success
loadToast.success();
- Unfortuantely it has failed
loadToast.error();
- Hmm... Succeeded but there's something tricky
loadToast.warning();
Want to contribute? #
Pull requests and issues are always welcome!
How to contribute?
- Fork the repository
- Clone it to your local machine
- Open the project in your favourite editor
- Open cmd/terminal and run flutter clean and then flutter packages get
- Make the changes
- Create a Pull Request
View the issues here
Inspired by loadToast - android