in_app_notification 0.1.0
in_app_notification: ^0.1.0 copied to clipboard
A Flutter package for show custom in-app notification.
💬 in_app_notification #
A Flutter package for show custom in-app notification.
✍️ Usage #
-
Import it.
dependencies: in_app_notification: <latest-version>
import 'package:in_app_notification/in_app_notification.dart';
-
Place
InAppNotification
Widget into your app. We recommend to place it in thebuilder
of theMaterialApp
.return MaterialApp( home: const HomePage(), builder: (context, child) => InAppNotification( safeAreaPadding: MediaQuery.of(context).viewPadding, minAlertHeight: 60.0, child: child, ), );
-
Get
InAppNotification
instance viaof()
method, and invokeshow()
method.InAppNotification.of(context).show( child: YourOwnWidget(), onTap: () => print('Notification tapped!'), duration: Duration(milliseconds: _duration), );
🗺 Roadmap / Known issue #
- Null-safety migration
- Implementation for more gesture
- Swipe horizontal
- Performance optimization
- Currently
InAppNotification
is recommended to use inbuilder
ofMaterialApp
, but it means create instance each time of routing.
- Currently
- Animation improvement
- So far, we have confirmed that using a Widget with a height higher than the
minAlertHeight
specified forInApp
will slightly break the animation.
- So far, we have confirmed that using a Widget with a height higher than the
💭 Have a question? #
If you have a question or found issue, feel free to create an issue.