0 purchases
bottom loader
bottom_loader #
A light weight package to show loader using bottom modal sheet. As it is a stateful widget, you can change the text shown on the bottom sheet dynamically.
Supported Dart Versions #
Dart SDK version >= 2.12.0
Demo #
Installation #
Add the Package
dependencies:
bottom_loader: ^0.2.2
copied to clipboard
How to use #
Import the package in your dart file
import 'package:bottom_loader/bottom_loader.dart';
copied to clipboard
Create an instance of BottomLoader
BottomLoader bl;
copied to clipboard
Initialise the bl object inside the build() method passing context to it
Initialize the Bottom Loader object
bl = new BottomLoader(context);
copied to clipboard
By default it will show a bottom loader with loader as CircularProgressIndicator but you can specify a custom loader widget and specify if you want your bottom loader to dismiss when back button is pressed isDismissible parameter (Optional)
//For bottom loader
//loader aceepts any custom widget as loader
bl = new BottomLoader(context, isDismissible: true/false, showLogs: true/false,loader: CircularProgressIndicator());
copied to clipboard
Style the bottom loading sheet (Optional)
bl.style(
message: 'Loading File...',
backgroundColor: Colors.white,
messageTextStyle: TextStyle(
color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600)
);
copied to clipboard
Note: You don't need to use all parameters, all of them are optional
copied to clipboard
Showing the bottom loader
await bl.show();
copied to clipboard
Dismissing the bottom loader
bl.close().then((isHidden) {
print(isHidden);
});
copied to clipboard
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
This library is only tested for Android, iOS contributors are most welcome
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.