Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meetleev/flutter_any_loading
Use without context, showToast/showSuccess/showError/showLoading/showNetLoading/showModal for Flutter.
https://github.com/meetleev/flutter_any_loading
Last synced: 1 day ago
JSON representation
Use without context, showToast/showSuccess/showError/showLoading/showNetLoading/showModal for Flutter.
- Host: GitHub
- URL: https://github.com/meetleev/flutter_any_loading
- Owner: meetleev
- License: apache-2.0
- Created: 2022-10-03T11:19:10.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-27T13:13:44.000Z (10 months ago)
- Last Synced: 2024-01-27T14:30:54.219Z (10 months ago)
- Language: Dart
- Homepage: https://pub.dev/packages/any_loading
- Size: 304 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# any_loading
[![Pub](https://img.shields.io/pub/v/any_loading.svg?style=flat-square)](https://pub.dev/packages/any_loading)
[![support](https://img.shields.io/badge/platform-android%20|%20ios%20|%20web%20|%20macos%20|%20windows%20|%20linux%20-blue.svg)](https://pub.dev/packages/any_loading)Use without context, showToast/showSuccess/showError/showLoading/showNetLoading/showModal for Flutter.
## Features
* support Toast, ModalDialog, Loading.
* support NetLoading. Block the ui event to delay the display of the loading bar for a few seconds.[comment]: <> (## Live Preview)
[comment]: <> (👉 [https://meetleev.github.io/flutter_any_loading](https://meetleev.github.io/flutter_any_loading/#/))
## Getting started
Add the package to your `pubspec.yaml`:
```yaml
dependencies:
any_loading:
```## Usage
First, initialize AnyLoading in your MaterialApp or CupertinoApp:
``` dart
MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const TestPage(),
builder: AnyLoading.init(),
)
```Then, you can:
``` dart
AnyLoading.showToast('msg');
AnyLoading.showModal(title: 'title', content: 'content', success: (bool isSuccess) => print('isSuccess--->$isSuccess'));
AnyLoading.showLoading(title: 'Loading', maskType: AnyLoadingMaskType.black, style:AnyLoadingStyle.dark());
AnyLoading.showNetLoading(title: 'Loading', position: AlignmentDirectional.center,
delayShowIndicatorDuration: Duration(seconds: 5));
AnyLoading.dismiss();
// ...
```[comment]: <> (## Additional information)