firebase_cloud_messaging_interop 3.0.0 firebase_cloud_messaging_interop: ^3.0.0 copied to clipboard
A dart plugin to use the Firebase Cloud Messaging Api (JS). You can retrieve the user's FCM token, delete it, access the notification data, ...
import 'package:example/firebase_cloud_messaging_interop_example.dart';
import 'package:flutter/material.dart';
final NotificationService notificationService = NotificationService();
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
body: TextButton(
onPressed: notificationService.getPermission,
child: const Text('Request perm')),
),
);
}
}