This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:firebase_messaging/firebase_messaging.dart'; | |
| import 'package:flutter/foundation.dart'; | |
| import 'package:flutter_local_notifications/flutter_local_notifications.dart'; | |
| import '../../controllers/user/user_controller.dart'; // this is User controller class. It is required to save FCM token | |
| class FCM { | |
| FCM(); | |
| final String _vapidKey = | |
| 'YOUR WEB TOKEN OF FIREBASE ACCOUNT/yourProject/PROJECT SETTINGS/CLOUD MESSAGING/WEB CONFIGURATION/ WEB PUSH CERTIFICATES/Key Pair'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| void main() => runApp(const MaterialApp(home: ToDo())); | |
| class ToDo extends StatelessWidget { | |
| const ToDo({Key? key}) : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { |