overlay_kit

Last updated:

0 purchases

overlay_kit Image
overlay_kit Images
Add to Cart

Description:

overlay kit

overlay_loading_progress #
A flutter package of overlay kit.
Content #

Loading Progress
Toast Message
Future Extension

Usage #
1- add this line to pubspec.yaml
dependencies:
overlay_kit: ^1.0.7
copied to clipboard
2- import package
import 'package:overlay_kit/overlay_kit.dart';
copied to clipboard
3- Wrap your MaterialApp with OverlayKit
@override
Widget build(BuildContext context) {
return OverlayKit(
child: MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
),
);
}
copied to clipboard
1. Loading Progress #
Start it with
OverlayLoadingProgress.start();
copied to clipboard
Stop it with
OverlayLoadingProgress.stop();
copied to clipboard
Complete Example
OverlayLoadingProgress.start();
await Future.delayed(const Duration(seconds: 3));
OverlayLoadingProgress.stop();
copied to clipboard

Use With Gif
OverlayLoadingProgress.start(gifOrImagePath: 'assets/loading.gif');
await Future.delayed(const Duration(seconds: 3));
OverlayLoadingProgress.stop();
copied to clipboard

Use With Custom Widget
OverlayLoadingProgress.start(
widget: Container(
width: MediaQuery.of(context).size.width / 4,
padding: EdgeInsets.all(MediaQuery.of(context).size.width / 13),
child: const AspectRatio(
aspectRatio: 1,
child: const CircularProgressIndicator(),
),
),
);
await Future.delayed(const Duration(seconds: 3));
OverlayLoadingProgress.stop();
copied to clipboard
2- Toast Message #
Show it with
OverlayToastMessage.show(textMessage: 'Dismiss All And Show Toast');
copied to clipboard

Use With Custom Widget
OverlayToastMessage.show(
widget: yourWidget,
);
copied to clipboard

2- Future Extension #
Show Loading Progress with Extension.
Future.delayed(const Duration(seconds: 5)).callWithProgress();
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.