{"id":13606028,"url":"https://github.com/KaushalVasava/Firestore-Listener-Flow","last_synced_at":"2025-04-12T07:33:19.627Z","repository":{"id":144548536,"uuid":"595071645","full_name":"KaushalVasava/Firestore-Listener-Flow","owner":"KaushalVasava","description":"It is a library for simplifying Firestore listener callbacks to Kotlin flow and suspend function to easily manage and use callbacks.","archived":false,"fork":false,"pushed_at":"2023-11-09T10:59:21.000Z","size":141,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T18:34:16.866Z","etag":null,"topics":["android","android-library","firebase","firestore","flows","kotlin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KaushalVasava.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-01-30T10:35:02.000Z","updated_at":"2025-02-04T16:54:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"e407c36a-5b64-4705-9dbb-6df17f4a0bbf","html_url":"https://github.com/KaushalVasava/Firestore-Listener-Flow","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaushalVasava%2FFirestore-Listener-Flow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaushalVasava%2FFirestore-Listener-Flow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaushalVasava%2FFirestore-Listener-Flow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaushalVasava%2FFirestore-Listener-Flow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KaushalVasava","download_url":"https://codeload.github.com/KaushalVasava/Firestore-Listener-Flow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248534418,"owners_count":21120323,"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":["android","android-library","firebase","firestore","flows","kotlin"],"created_at":"2024-08-01T19:01:05.379Z","updated_at":"2025-04-12T07:33:19.284Z","avatar_url":"https://github.com/KaushalVasava.png","language":"Kotlin","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"readme":"# Firestore-Listener-Flow\n\nIt is a library for simplifying Firestore listener callbacks to Kotlin flow and suspend function to easily manage and use callbacks.\n\nFirebase callbacks like addSnapshotListener and addOnCompleteListener are simplified using Flows so you can easily write clean code. \n\n# Steps\n1. Add the JitPack repository to your build file\nAdd it in your root build.gradle at the end of repositories:\n```\nallprojects {\n\trepositories {\n\t     ...\n             maven { url 'https://jitpack.io' }\n\t}\n}\n```\n\n2. Add the dependency\n```\ndependencies {\n      implementation 'com.github.KaushalVasava:firestore-listener-flow:1.0'\n}\n```\n\n# Demo Example\nYou can use now toValueFlow\u003cCart\u003e instead of addOnSnapshotListener.\n```\n  val cartFlow: Flow\u003cBaseState\u003cCart\u003e\u003e = \n        Firebase.firestore.collection(\"users\").document(userId)\n            .collection(\"cart\").document(userId).toValueFlow\u003cCart\u003e()\n            .map { cart -\u003e\n                BaseState.Success(\n                    Cart(\n                        items = cart.items.entries.associate {\n                            it.key to BaseState.Success(it.value)\n                        },\n                        cartId = cart.id,\n                        addressId = cart.addressId\n                    )\n                )\n          }\n```\n# Technology and Build \n- Kotlin\n- Firebase firestore\n- JDK-17\n- Kotlin 1.9.20 \n- Gradle 8.1\n\n# Licence\nCopyright 2023 Kaushal Vasava\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n# Author\nKaushal Vasava\n\nIf you find any issues or want to give some suggestions then contact me on LinkedIn, Twitter or Instagram.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKaushalVasava%2FFirestore-Listener-Flow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKaushalVasava%2FFirestore-Listener-Flow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKaushalVasava%2FFirestore-Listener-Flow/lists"}