Search packages, repositories and app categories

GitHub repositoryspporan/FlutterOverlayLoader

FlutterOverlayLoader

A new Flutter package for developer who want to show overlay loader or progress Indicator for completing future task.

FlutterOverlayLoader project cover
Stars
6
Forks
12
Last push (UTC)
May 16, 2022
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

Build Passing Pub Version Pub Likes Pub Points Pub Popularity GitHub forks GitHub stars GitHub issues GitHub followers Twitter GitHub license

flutter_overlay_loader

A simple Flutter package for managing loader when fetching remote data or any long running async task. Flutter overlay loader is easy to use. You can show loader using only write two lines of code.

Overlay loader without overlaying Appbar

drawing drawing

Overlay Loader without overlaying BottomAppBar and also overlaying AppBar

drawing

Getting Started

Installing

dependencies:
  flutter_overlay_loader: ^1.0.8
Import
import 'package:flutter_overlay_loader/flutter_overlay_loader.dart';

How To Use

When start network call then call this line of code..

Loader.show(context,progressIndicator:LinearProgressIndicator());

After finished network call then call :

Loader.hide();

You can customize this loader..

Loader.show(context,
  isSafeAreaOverlay: false,
  isBottomBarOverlay: false,
  overlayFromBottom: 80,
  overlayColor: Colors.black26,
  progressIndicator: CircularProgressIndicator(backgroundColor: Colors.red),
  themeData: Theme.of(context)
    .copyWith(colorScheme: ColorScheme.fromSwatch().copyWith(secondary: Colors.green))
);

You can also check loader is showing or not using the property : Loader.isShown and you can prevent back pressed like this snippet:

WillPopScope(
  child: //TODO , 
  onWillPop:()async => !Loader.isShown
)

Finally dispose call hide method on dispose method :

@override
void dispose() {
  Loader.hide();

  super.dispose();
}
Shah Poran GitHub avatar
GitHub author

Shah Poran ↗

Android | Kotlin | Flutter | Solve Problem With Code | Open Source Enthusiast | Author at pub.dev

Ridmik LabsDhaka, Bangladesh
LanguagesDartSwiftJavaObjective-C

Packages published by this repository

Dependencies used

Dependency list 3 items

  • flutter{"sdk":"flutter"}
  • flutter_testDevelopment{"sdk":"flutter"}
  • lintsDevelopment^2.0.0

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗