{"id":21380775,"url":"https://github.com/savannahghi/dart_fcm","last_synced_at":"2026-05-09T18:35:11.452Z","repository":{"id":45432411,"uuid":"375348754","full_name":"savannahghi/dart_fcm","owner":"savannahghi","description":"dart_fcm is a wrapper package for setting up and consuming cloud notifications from firebase","archived":false,"fork":false,"pushed_at":"2022-09-28T08:46:36.000Z","size":72,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-01-21T00:37:06.548Z","etag":null,"topics":["dart","fcm-notifications","firebase","flutter"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/dart_fcm","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/savannahghi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-09T12:33:43.000Z","updated_at":"2024-03-31T08:14:37.000Z","dependencies_parsed_at":"2022-08-04T15:00:35.365Z","dependency_job_id":null,"html_url":"https://github.com/savannahghi/dart_fcm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/savannahghi%2Fdart_fcm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/savannahghi%2Fdart_fcm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/savannahghi%2Fdart_fcm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/savannahghi%2Fdart_fcm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/savannahghi","download_url":"https://codeload.github.com/savannahghi/dart_fcm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243857996,"owners_count":20359259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-notifications","firebase","flutter"],"created_at":"2024-11-22T10:42:43.515Z","updated_at":"2026-05-09T18:35:11.408Z","avatar_url":"https://github.com/savannahghi.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Release](https://img.shields.io/badge/Version-^0.1.0-success.svg?style=for-the-badge)](https://shields.io/)\n[![Maintained](https://img.shields.io/badge/Maintained-Actively-informational.svg?style=for-the-badge)](https://shields.io/)\n\n# dart_fcm\n\n`dart_fcm` is an open source project \u0026mdash; it's one among many other shared libraries that make up the wider ecosystem of software made and open sourced by `Savannah Informatics Limited`.\n\ndart_fcm is a wrapper package for setting up and consuming cloud notifications from firebase\n\n## Installation Instructions\n\nUse this package as a library by depending on it\n\nRun this command:\n\n- With Flutter:\n\n```dart\n$ flutter pub add dart_fcm\n```\n\nThis will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):\n\n```dart\ndependencies:\n  dart_fcm: ^0.1.0\n```\n\nAlternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.\n\nLastly:\n\nImport it like so:\n\n```dart\nimport 'package:dart_fcm/src/fcm.dart';\n\n```\n\n## Usage\n\nLets take a look at how to hook-up your application to use `dart_fcm`.\n\n```dart\nimport 'package:dart_fcm/dart_fcm.dart';\nimport 'package:flutter/material.dart';\n\nvoid main() {\n  runApp(const YourAppName());\n}\n\n/// [YourAppName] marks as the entry point to your application.\nclass YourAppName extends StatefulWidget {\n  const YourAppName({Key? key}) : super(key: key);\n\n  @override\n  _YourAppNameState createState() =\u003e _YourAppNameState();\n}\n\nclass _YourAppNameState extends State\u003cYourAppName\u003e {\n  bool hasFinishedLaunching = false;\n\n  @override\n  void didChangeDependencies() {\n    if (!hasFinishedLaunching) {\n      /// [configure] is responsible for correctly setting\n      /// up local notifications ( and asking for permission if needed) and wiring-up\n      /// firebase messaging [onMessage] callback to show fcm messages\n      SILFCM().configure(context: context);\n      hasFinishedLaunching = true;\n    }\n\n    super.didChangeDependencies();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return const MaterialApp(\n      home: Scaffold(\n          // Your application\n          ),\n    );\n  }\n}\n\n```\n\nWith the above snippet, we have successfully hooked up our application to use `dart_fcm`.\nYou have now bootstraped local notifications to your application for Android, iOS and macOS settings.\nThis will create notification channels and prompt the user for notification permissions. \nYour application has now enabled foreground notifications so that they can be visible while the app is in the foreground\n\nProvided [here](https://github.com/savannahghi/dart_fcm/tree/main/example) is a more detailed snippet, on how to use the package.\n\n## Dart \u0026 Flutter Version\n\n- Dart 2: \u003e= 2.12\n- Flutter: \u003e=2.0.0\n\n## Developing \u0026 Contributing\n\nFirst off, thanks for taking the time to contribute!\n\nBe sure to check out detailed instructions on how to contribute to this project [here](https://github.com/savannahghi/dart_fcm/blob/main/CONTRIBUTING.md) and go through out [Code of Conduct](https://github.com/savannahghi/dart_fcm/blob/main/CONTRIBUTING.md).\n\nGPG Signing: \nAs a contributor, you need to sign your commits. For more details check [here](https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification/signing-commits)\n\n## License\n\nThis library is distributed under the MIT license found in the [LICENSE](https://github.com/savannahghi/dart_fcm/blob/main/LICENSE) file.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsavannahghi%2Fdart_fcm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsavannahghi%2Fdart_fcm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsavannahghi%2Fdart_fcm/lists"}