{"id":19056386,"url":"https://github.com/lamnhan066/firebase_messaging_helper","last_synced_at":"2025-10-24T19:12:26.840Z","repository":{"id":52309931,"uuid":"520716362","full_name":"lamnhan066/firebase_messaging_helper","owner":"lamnhan066","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-04T16:57:53.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T01:28:44.623Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lamnhan066.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":"2022-08-03T02:48:58.000Z","updated_at":"2022-08-03T02:49:03.000Z","dependencies_parsed_at":"2022-08-27T05:41:26.938Z","dependency_job_id":null,"html_url":"https://github.com/lamnhan066/firebase_messaging_helper","commit_stats":null,"previous_names":["lamnhan066/firebase_messaging_helper"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lamnhan066/firebase_messaging_helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamnhan066%2Ffirebase_messaging_helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamnhan066%2Ffirebase_messaging_helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamnhan066%2Ffirebase_messaging_helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamnhan066%2Ffirebase_messaging_helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lamnhan066","download_url":"https://codeload.github.com/lamnhan066/firebase_messaging_helper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamnhan066%2Ffirebase_messaging_helper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264503949,"owners_count":23618762,"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":[],"created_at":"2024-11-08T23:49:15.428Z","updated_at":"2025-10-24T19:12:21.803Z","avatar_url":"https://github.com/lamnhan066.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Firebase Messaging Helper\n\nThis plugin combine firebase_messaging with awesome_notification to help you esier to implement firebase notification.\n\n## Setup\n\n### - Apple integration: [Read here](https://firebase.flutter.dev/docs/messaging/apple-integration)\n\n### - Android integration\n\nAdd the following `meta-data` schema within the `application` component:\n\n``` xml\n\u003cmeta-data\nandroid:name=\"com.google.firebase.messaging.default_notification_channel_id\"\nandroid:value=\"normal_channel\" /\u003e\n```\n\nAdd this intent-filter in AndroidManifest in the `\u003cactivity\u003e` tag with `android:name=\".MainActivity\"`:\n\n``` xml\n\u003cintent-filter\u003e\n    \u003caction android:name=\"FLUTTER_NOTIFICATION_CLICK\" /\u003e\n    \u003ccategory android:name=\"android.intent.category.DEFAULT\" /\u003e\n\u003c/intent-filter\u003e\n```\n\n## Usage\n\n### Initialize plugin\n\n``` dart\nFirebaseMessagingHelper.initial(\n    /// Show a dialog before asking for the permission\n    preDialogConfig: PreDialogConfig(\n        context: context,\n    ),\n\n    /// Callback when users tap on the notification\n    onTapped: (message) =\u003e print('tapped message = ${message.notification?.toMap()}'),\n\n    /// Callback when receving the notification on foreground\n    onForegroundMessage: (message) =\u003e print('foreground message =  ${message.notification?.toMap()}'),\n\n    /// Callback when receving the notification on background\n    onBackgroundMessage: backgroundNotificationHandler,\n\n    /// Show debug log\n    isDebug: true,\n);\n```\n\nThe `backgroundNotificationHandler` must be static or top-level method (do not support anonymous method)\n\n``` dart\nFuture\u003cvoid\u003e backgroundNotificationHandler(RemoteMessage message) async {\n    print('On background message = ${message.notification?.toMap()}');\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamnhan066%2Ffirebase_messaging_helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flamnhan066%2Ffirebase_messaging_helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamnhan066%2Ffirebase_messaging_helper/lists"}