{"id":22591464,"url":"https://github.com/netsells/flutter-fcm-token-sync","last_synced_at":"2026-03-15T19:35:05.843Z","repository":{"id":61973231,"uuid":"365250135","full_name":"netsells/flutter-fcm-token-sync","owner":"netsells","description":"A Flutter widget which keeps your FCM token in sync with your backend","archived":false,"fork":false,"pushed_at":"2022-04-21T12:51:28.000Z","size":15,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T23:27:30.129Z","etag":null,"topics":["dart","fcm","firebase","firebase-messaging","flutter"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/fcm_token_sync","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netsells.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-07T13:54:54.000Z","updated_at":"2024-03-26T08:27:56.000Z","dependencies_parsed_at":"2022-10-24T13:30:59.522Z","dependency_job_id":null,"html_url":"https://github.com/netsells/flutter-fcm-token-sync","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/netsells/flutter-fcm-token-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netsells%2Fflutter-fcm-token-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netsells%2Fflutter-fcm-token-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netsells%2Fflutter-fcm-token-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netsells%2Fflutter-fcm-token-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netsells","download_url":"https://codeload.github.com/netsells/flutter-fcm-token-sync/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netsells%2Fflutter-fcm-token-sync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30550353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-15T15:03:43.933Z","status":"ssl_error","status_checked_at":"2026-03-15T15:03:37.630Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","fcm","firebase","firebase-messaging","flutter"],"created_at":"2024-12-08T09:12:45.628Z","updated_at":"2026-03-15T19:35:05.827Z","avatar_url":"https://github.com/netsells.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FCM Token Sync\n\nA widget which keeps your FCM token in sync with your backend\n\n[![style: very good analysis](https://img.shields.io/badge/style-very_good_analysis-B22C89.svg)](https://pub.dev/packages/very_good_analysis)\n[![Gitmoji](https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg)](https://gitmoji.dev/)\n[![Pub Version](https://img.shields.io/pub/v/fcm_token_sync)](https://pub.dev/packages/fcm_token_sync)\n![GitHub](https://img.shields.io/github/license/netsells/flutter-fcm-token-sync)\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/netsells/flutter-fcm-token-sync/Test)\n[![Coverage Status](https://coveralls.io/repos/github/netsells/flutter-fcm-token-sync/badge.svg?branch=master)](https://coveralls.io/github/flutter-fcm-token-sync?branch=master)\n\n## ✨ Features\n\n- Keeps your user's FCM tokens in sync with your backend\n- Automatically handles permission requests\n- 100% test coverage\n- Null-safety\n\n## 🚀 Installation\n\nInstall from [pub.dev](https://pub.dev/packages/fcm_token_sync):\n\n```yaml\nfcm_token_sync: ^1.0.4\n```\n\n## ✅ Prerequisites\n\nYou should already have Firebase Cloud Messaging set up in your project. Go [here](https://firebase.flutter.dev/docs/messaging/overview) for setup instructions.\n\nAdditionally, you will need to have built a way to send FCM tokens to your backend service.\n\n## 🔨 Usage\n\nThis package contains a `FcmTokenSync` widget, which you can wrap around any widget in your project.\n\nSome recommendations for usage:\n\n- Add this widget to your tree wherever you want to ask your user for notification permissions.\n- This will probably be after the user has registered and/or signed in.\n\n### Example\n\n```dart\nclass HomePage extends StatelessWidget {\n    const HomePage({Key? key}) : super(key: key);\n\n    @override\n    Widget build(BuildContext context) {\n        return FcmTokenSync(\n            firebaseMessaging: FirebaseMessaging.instance,\n            onToken: _updateFcmToken,\n            child: Scaffold(), // Widget to display here\n        );\n    }\n\n    Future\u003cvoid\u003e _updateFcmToken(String token) async {\n        // Send the updated token to your backend here.\n    }\n}\n```\n\n## 👨🏻‍💻 Authors\n\n- [@ptrbrynt](https://www.github.com/ptrbrynt) at [Netsells](https://netsells.co.uk/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetsells%2Fflutter-fcm-token-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetsells%2Fflutter-fcm-token-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetsells%2Fflutter-fcm-token-sync/lists"}