notification_wall 1.0.8 icon indicating copy to clipboard operation
notification_wall: ^1.0.8 copied to clipboard

A statefull widget to initialize and handle Firebase messaging notifications, using a IndexedStack to keep app state.

notification_wall #

A statefull widget to initialize and handle Firebase messaging notifications.

Getting Started #

This widget handle new notifications;

This requires a manual setup of the firebase_messaging package to works. https://pub.dev/packages/firebase_messaging.

TODO: #

  • automatic setup;
import 'package:notification_wall/notification_wall.dart';
import 'package:firebase_messaging/firebase_messaging.dart';


class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Flutter NotificationWall Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: NotificationWall(
          topicsToSubscribe: ["news", "updates"],

          /// New token arrived, do something...
          onSetTokenCallback: (String token) {},

          /// we finished setting up
          onSetupIsDoneCallback: () {},

          /// New RemoteMessage arrived, do something...
          onNewNotificationCallback: (RemoteMessage? message) {},

          /// to hide the returned widgets, just put the NotificationWall as
          /// child of an IndexedStack
          /// Show this widget while setting up
          onSettingUpWall: Scaffold(
            body: Container(
              child: Center(
                child: Text("Setting Up remotenotifications"),
              ),
            ),
          ),

          ///show this after setting up is done...
          childWidget: MyHomePage(title: 'Flutter Demo Home Page'),
        ));
  }
}

1
likes
130
pub points
26%
popularity

Publisher

verified publisher iconsharedway.app

A statefull widget to initialize and handle Firebase messaging notifications, using a IndexedStack to keep app state.

Homepage
Repository (GitHub)

Documentation

API reference

License

Icon for licenses.BSD-3-Clause (LICENSE)

Dependencies

firebase_core, firebase_messaging, flutter, flutter_local_notifications

More

Packages that depend on notification_wall