The easiest way to show notification.

Overview

Starlight Notification

The easiest way to show notification.

Features

☑️ Show Notification
☑️ Cancel Notification
☑️ Cancel All Notification

Watch the video

Watch the video

Installation

Add starlight_notification as dependency to your pubspec file.

starlight_notification: 
    git:
      url: https://github.com/YeMyoAung/starlight_notification.git

Android Setup

You need to put ic_launcher into app/src/main/res/drawable folder.

Screenshot

add the following attributes to the activity

   <activity
    android:showWhenLocked="true"
    android:turnScreenOn="true">

Ios Setup

Add the following lines to the didFinishLaunchingWithOptions method in the AppDelegate.swift file of your iOS project

if #available(iOS 10.0, *) {
  UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
}

Usage

First of all you need to import our package.

import 'package:starlight_notification/starlight_notification.dart';

Initializing StarlightNotification

To initialize StarlightNotificationService, call the instance method on the StarlightNotificationService class:

 await StarlightNotificationService.setup();

you can also pass this callback

 await StarlightNotificationService.setup(
    onSelectNotification: (e){
      ///ToDo
    }
  );

And then you can invoke anytime,anywhere when you need.You can also use with firebasemessaging.

Show Notification

import 'package:flutter/material.dart';
import 'package:starlight_notification/starlight_notification.dart';

Future<void> main() async {
  ///important
  WidgetsFlutterBinding.ensureInitialized();

  ///important
  await StarlightNotificationService.setup(
    onSelectNotification: (e){
      ///ToDo
    }
  );

  ///and then you can invoke anytime,anywhere when you need
  ///you can also use with firebasemessaging

  ///show notification
  await StarlightNotificationService.show(
    StarlightNotification(
      title: 'hello',
      body: 'hi',
      payload: '{"name":"mg mg","age":20}',
    ),
  );
}

Cancel Notification

import 'package:flutter/material.dart';
import 'package:starlight_notification/starlight_notification.dart';

Future<void> main() async {
  ///important
  WidgetsFlutterBinding.ensureInitialized();

  ///important
  await StarlightNotificationService.setup(
    onSelectNotification: (e){
      ///ToDo
    }
  );

  ///and then you can invoke anytime,anywhere when you need
  ///you can also use with firebasemessaging

  ///cancel notification
  await StarlightNotificationService.cancel('hello');
}

Cancel All Notification

import 'package:flutter/material.dart';
import 'package:starlight_notification/starlight_notification.dart';

Future<void> main() async {
  ///important
  WidgetsFlutterBinding.ensureInitialized();

  ///important
  await StarlightNotificationService.setup(
    onSelectNotification: (e){
      ///ToDo
    }
  );

  ///and then you can invoke anytime,anywhere when you need
  ///you can also use with firebasemessaging

  ///cancel all notification
  await StarlightNotificationService.cancelAll();
}

Contact Us

Starlight Studio

You might also like...

Audio manager - A flutter plugin for music playback, including notification handling.

Audio manager - A flutter plugin for music playback, including notification handling.

audio_manager A flutter plugin for music playback, including notification handling. This plugin is developed for iOS based on AVPlayer, while android

Oct 25, 2022

This Dashboard was made to show one of the use cases in which Flutter web is applied.

This Dashboard was made to show one of the use cases in which Flutter web is applied.

Dashboard Flutter Web This Dashboard was made to show one of the use cases in which Flutter web is applied. Tasks Improve the splash Screen Create Log

Nov 2, 2022

Flutter app that uses Instagram public API to show users profile

instagramfinder A new Flutter project. Getting Started This project is a starting point for a Flutter application. I used Instagram public API for fet

Sep 7, 2022

A Flutter package which implements a ConvexAppBar to show a convex tab in the bottom bar. Theming supported.

A Flutter package which implements a ConvexAppBar to show a convex tab in the bottom bar. Theming supported.

English | 简体中文 The official BottomAppBar can only display a notch FAB with an app bar, and sometimes we need a convex FAB. BottomAppBar and NotchShape

Dec 28, 2022

Android app to show movie ratings when browsing Netflix, Amazon Prime Video and other supported video streaming apps on the phone

Android app to show movie ratings when browsing Netflix, Amazon Prime Video and other supported video streaming apps on the phone

Flutter - Movie Ratings You can get the latest Playstore version here on Playstore - or download directly - 0.4.5 Screenshots of master Search Page Fa

Nov 23, 2022

An app to show everything bus related in Singapore, including arrival times and a directory

An app to show everything bus related in Singapore, including arrival times and a directory

NextBus SG An app to show everything bus related in Singapore, including bus arrival times and a directory, with extra features. 🎆 Gallery Click here

Sep 13, 2022

A widget to show json object

A widget to show json object

flutter_json_widget A Json viewer widget for flutter. Using the library The /example/ folder in the GitHub repo contains a full Flutter app with demo

Dec 28, 2021

A flutter widget that show the camera stream and allow ML vision recognition on it, it allow you to detect barcodes, labels, text, faces...

A flutter widget that show the camera stream and allow ML vision recognition on it, it allow you to detect barcodes, labels, text, faces...

Flutter Camera Ml Vision A Flutter package for iOS and Android to show a preview of the camera and detect things with Firebase ML Vision. Installation

Jan 2, 2023

This App Currently is a Simple Budget Manager Show Analytics Based on Your Past Transactions

This App Currently is a Simple Budget Manager Show Analytics Based on Your Past Transactions

Budgex [In Progress] This App Currently is a Simple Budget Manager Show Analytics Based on Your Past Transactions Features Localization Persistant Sto

Nov 14, 2022
Owner
Ye Myo Aung
Programming is my passion.
Ye Myo Aung
A Flutter package for show custom in-app notification.

?? in_app_notification A Flutter package to show custom in-app notification with any Widgets. ✍️ Usage Import it. dependencies: in_app_notificatio

CBcloud 18 Oct 27, 2022
Provide easy and flexible way to show SnackBar. Simple text, undo, and error style are supported.

snack_bar_presenter Provide easy and flexible way to show SnackBar. Simple text, undo, and error style are supported. . . . Usage import 'package:exam

Masayuki Ono (mono) 8 Nov 30, 2020
This plugin lets you show a message in a simple way.

error_message This plugin lets you show a message in a simple way. Usage ErrorMessage( icon: Icon(Icons.error), title: "Error Title",

TamilKannan-Developer 0 Dec 5, 2021
Flutter notification using firebase fcm

fcm_flutter_notifications A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get yo

Nisha Jain 1 Jan 31, 2022
Reminder App using Firebase Notification Flutter

Reminder App using Firebase Notification Flutter Reminder app which is used to create task as reminder. In this app, I have used Firebase notification

Iqrar Ijaz 3 Aug 8, 2022
Flutter Local Notification Test APP

Local Notification Test App For Testing and Learning Local Notification Information I made it by referring to the site below [flutter] local notificat

SharkBSJ 1 Nov 20, 2021
An extension of flutter local notification, to simplify local notifications

Locally flutter local notification Locally helps developers create local notification with flutter on both Android and IOS platforms, it depends on th

Samuel Ezedi 20 Oct 10, 2022
Android application checking the new notes on Pronote and warns by notification

Pronote notification Application Android vérifiant les nouvelles notes sur Pronote et prévient par notification Fonctionnalités Application codée et t

Valentin Saugnier 1 Sep 4, 2022
Flutter plugin for notification read & reply

Reflex Flutter plugin for notification read & reply. Compatibility ✅ Android ❌ i

Devs On Flutter 14 Dec 20, 2022
The app is for notification of notice from teachers for students with alerts.

wce_notice_board A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

mali krushna 2 Sep 24, 2022