notif_bell 0.1.7

  • Readme
  • Changelog
  • Example
  • Installing
  • 60

notif_bell #

THE FRONTEND FOR YOUR APP NOTIFICATIONS. notif_bell serves as your customizable notification badge or widget in your app. It helps you maintain the notifications to your user by passing some required parameters like size and whether to notify or not and more optional parameters to customize your notification widget. Notification Widget in Flutter. Notification Badge in Flutter.

Usage #

To use this plugin add notif_bell as a dependency in your pubspec.yaml file.

Import the package and use the Widget in your app in this way:

Example #

NotifBell( notify: true, size: 35.0, // size of the widget. notifs: 2, ),

The major properties of the widget that can be used to customize it in your way are:

notify, notifs, size, onTap

Please see the example app of this plugin for a full example.

0.1.7 #

  • Plugin Documentation Updates.

0.1.6 #

  • Plugin Launch.


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

import 'package:flutter/services.dart';
import 'package:notif_bell/notif_bell.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  _MyAppState createState() => _MyAppState();

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';

  void initState() {

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    String platformVersion;
    // Platform messages may fail, so we use a try/catch PlatformException.
    try {
      platformVersion = await NotifBell.platformVersion;
    } on PlatformException {
      platformVersion = 'Failed to get platform version.';

    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
    if (!mounted) return;

    setState(() {
      _platformVersion = platformVersion;

  Widget build(BuildContext context) {
    print('Running on: $_platformVersion\n');
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
          actions: <Widget>[
              padding: const EdgeInsets.all(8.0),
              child: NotifBell(
                notify: true,
                size: 35.0, // size of the widget.
                notifs: 2,
        body: Center(
            child: NotifBell(
          notify: true,
          size: 60.0, // size of the widget.
          notifs: 2,

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  notif_bell: ^0.1.7

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:notif_bell/notif_bell.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Mar 31, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies