engagespot_sdk 0.0.1 copy "engagespot_sdk: ^0.0.1" to clipboard
engagespot_sdk: ^0.0.1 copied to clipboard

A Flutter SDK for integrating the Engagespot service into your applications. Handle notifications, mark them as read, register Firebase Cloud Messaging (FCM) tokens, and listen to real-time notificati [...]

example/lib/main.dart

import 'package:engagespot_sdk/models/Notifications.dart';
import 'package:flutter/material.dart';
import 'package:engagespot_sdk/engagespot_sdk.dart';

void main() {
  Engagespot.initSdk(
    isDebug: true,
    apiKey: "<<api_key>>",
  );

  Engagespot.LoginUser(userId: "<<user_id>>");
  runApp(const MainApp());
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: InkWell(
            onTap: () async {
              // Engagespot.LoginUser(userId: "sabarinath5604@gmail.com");
              Engagespot.ListernMessage(
                  onMessage: (event) {
                    //   print(event.title);
                  },
                  onReadAll: () {});
              NotificationSet ns = await Engagespot.getNotifications();
            },
          ),
        ),
      ),
    );
  }
}
6
likes
0
points
64
downloads

Publisher

verified publisherengagespot.co

Weekly Downloads

A Flutter SDK for integrating the Engagespot service into your applications. Handle notifications, mark them as read, register Firebase Cloud Messaging (FCM) tokens, and listen to real-time notification events with ease

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http, shared_preferences, socket_io_client

More

Packages that depend on engagespot_sdk