Skip to content

Commit

Permalink
4.0.1
Browse files Browse the repository at this point in the history
- Added back isLoading to indicate if the loader is showing
  • Loading branch information
arnold-parge committed Dec 17, 2021
1 parent b94abff commit f609335
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.0.1

* Added back isLoading to indicate if the loader is showing

## 4.0.0

* Added support for using the loader in `StatelessWidget` too
Expand Down
7 changes: 5 additions & 2 deletions lib/screen_loader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,18 @@ class ScreenLoaderStream with StreamMixin<bool> {

mixin ScreenLoader {
final ScreenLoaderStream _screenLoaderStream = ScreenLoaderStream();
bool isLoading = false;

/// starts the [loader]
startLoading() {
_screenLoaderStream.update(true);
isLoading = true;
_screenLoaderStream.update(isLoading);
}

/// stops the [loader]
stopLoading() {
_screenLoaderStream.update(false);
isLoading = false;
_screenLoaderStream.update(isLoading);
}

/// To avoid use of [startLoading] and [stopLoading] you use use
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: screen_loader
description: Easy to use mixin ScreenLoader, which will handle the loading on the screen without using state or navigation stack. You can customise the loading as well.
version: 4.0.0
version: 4.0.1
homepage: https://github.com/arnold-parge/screen_loader

environment:
Expand Down

0 comments on commit f609335

Please sign in to comment.