Last updated:
0 purchases
flutter rr toast
RRToast #
An easy to use flutter toast library with more features!
Language: English | (README.md) #
🕊️Overview
🐦Example
🐮Getting started
🦅3.0 version
📃Documentation
🕊️Overview #
In the true sense of Toast, you can call it whenever you need it, without any restrictions!
Feature-rich, support for displaying notifications, text, loading with image and circularProgressIndicator, attachments, etc. Toast
Awesome customize widgets with Animations.
Create Pop-ups, dialog widgets
Support for popping up various custom Toasts, or you can pop up any Widget as long as it meets the requirements of the flutter code.
Pure flutter implementation
🕊️Online Demo #
Online demo (Web effects may be biased, the actual effect is subject to the mobile phone)
🕊️Example #
Sample project
🐮Getting started #
1. add dependencies into you project pubspec.yaml file
dependencies:
flutter_rr_toast: ^0.0.1
#null safety
copied to clipboard
2. import RRToast lib
import 'package:flutter_rr_toast/flutter_rr_toast.dart';
copied to clipboard
3. initialization RRToast
MaterialApp(
title: 'RRToast Demo',
builder: RRToastInit(), //1. call RRToastInit
navigatorObservers: [RRToastNavigatorObserver()], //2. registered route observer
home: XyzPage(),
)
copied to clipboard
or
//Warning: Don't arbitrarily adjust the position of calling the RRToastInit function
final rrToastBuilder = RRToastInit(); //1. call RRToastInit
MaterialApp(
title: 'RRToast Demo',
builder: (context, child) {
child = myBuilder(context,child); //do something
child = rrToastBuilder(context,child);
return child;
},
navigatorObservers: [RRToastNavigatorObserver()], //2. registered route observer
home: XyzPage(),
)
copied to clipboard
4. use RRToast
var cancel = RRToast.showText(text:"xyzxm"); //popup a text rr toast;
...
cancel(); //close
copied to clipboard
var cancel = RRToast.showSimpleNotification(title: "init");
// popup a notification rr toast;
...
cancel(); //close
copied to clipboard
var cancel = RRToast.showLoading(image: Image.asset('assets/img/xxxx.png'));
//popup a loading rr toast with image as an optional.
...
cancel(); //close
copied to clipboard
var cancel = RRToast.showLoading();
//popup a loading rr toast with CircularProgressIndicator
...
cancel(); //close
copied to clipboard
//popup a attachments toast
var cancel = RRToast.showAttachedWidget(
attachedBuilder: (_) => Card(
child: Padding(
padding: const EdgeInsets.all(4.0),
child: Icon(
Icons.bookmark,
color: Colors.blueAccent,
),
),
),
duration: Duration(seconds: 2.5),
target: Offset(320, 320));
...
cancel(); //close
copied to clipboard
//custom api
var cancelToast = RRToast.showCustomNotification(...)
var cancelToast = RRToast.showCustomText(...)
var cancelToast = RRToast.showCustomLoading(...)
var cancelToast = RRToast.showAnimationWidget(...)
...
cancel(); //close
copied to clipboard
🐦3.0 version #
//3.x.x version initialization method
MaterialApp(
title: 'RRToast Demo',
builder: RRToastInit(),
navigatorObservers: [RRToastNavigatorObserver()],
home: XxxxPage(),
)
copied to clipboard
📃Documentation #
Documentation
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.