{"id":13551099,"url":"https://github.com/sarbagyastha/flutter_rating_bar","last_synced_at":"2025-05-16T05:00:27.408Z","repository":{"id":34371067,"uuid":"178110536","full_name":"sarbagyastha/flutter_rating_bar","owner":"sarbagyastha","description":"A simple ratingbar for flutter which also include a rating bar indicator, supporting any fraction of rating.","archived":false,"fork":false,"pushed_at":"2024-09-20T01:55:52.000Z","size":20916,"stargazers_count":411,"open_issues_count":48,"forks_count":103,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-10-12T20:04:17.456Z","etag":null,"topics":["android","custom-rating","flutter","flutter-package","flutter-plugin","flutter-rating","ios","rating","ratingbar","widgets"],"latest_commit_sha":null,"homepage":null,"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/sarbagyastha.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-28T02:28:17.000Z","updated_at":"2024-10-07T22:06:23.000Z","dependencies_parsed_at":"2024-06-18T12:31:30.657Z","dependency_job_id":"fdab2474-29db-4f92-aa61-2f26dda562a0","html_url":"https://github.com/sarbagyastha/flutter_rating_bar","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/sarbagyastha%2Fflutter_rating_bar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarbagyastha%2Fflutter_rating_bar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarbagyastha%2Fflutter_rating_bar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarbagyastha%2Fflutter_rating_bar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sarbagyastha","download_url":"https://codeload.github.com/sarbagyastha/flutter_rating_bar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471028,"owners_count":22076582,"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","custom-rating","flutter","flutter-package","flutter-plugin","flutter-rating","ios","rating","ratingbar","widgets"],"created_at":"2024-08-01T12:01:42.302Z","updated_at":"2025-05-16T05:00:27.314Z","avatar_url":"https://github.com/sarbagyastha.png","language":"Dart","funding_links":[],"categories":["Dart","Packages"],"sub_categories":[],"readme":"![FLUTTER RATING BAR](rating_bar_banner.png)\n\n[![Pub](https://img.shields.io/pub/v/flutter_rating_bar.svg)](https://pub.dartlang.org/packages/flutter_rating_bar) \n[![License](https://img.shields.io/badge/licence-MIT-orange.svg)](https://github.com/sarbagyastha/flutter_rating_bar/blob/master/LICENSE)\n[![Web Demo](https://img.shields.io/badge/Web-Demo-blueviolet.svg)](https://sarbagyastha.com.np/flutter_rating_bar/)\n[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/sarbagyastha/flutter_rating_bar.svg)](https://github.com/sarbagyastha/flutter_rating_bar)\n[![GitHub stars](https://img.shields.io/github/stars/sarbagyastha/flutter_rating_bar.svg?style=social)](https://github.com/sarbagyastha/flutter_rating_bar)\n\n\nA simple yet fully customizable rating bar for flutter which also include a rating bar indicator, supporting any fraction of rating.\n\n![DEMO](flutter_rating_bar.gif) \n\n## Salient Features\n- Set minimum and maximum rating\n- Any widgets can be used as as rating bar/indicator items\n- Different widgets can be used in same rating bar as per position\n- Supports vertical layout\n- Glows on interaction\n- Supports RTL mode\n\n#### [Web Demo](https://sarbagyastha.com.np/flutter_rating_bar/)\n\n\n## Usage\n\n#### Using Flutter Rating Bar\nRating Bar can be used in three ways.\n\n###### First Way:\nUsing `RatingBar.builder()`\n\n![First Way](images/mode1.jpg) \n```dart\nRatingBar.builder(\n   initialRating: 3,\n   minRating: 1,\n   direction: Axis.horizontal,\n   allowHalfRating: true,\n   itemCount: 5,\n   itemPadding: EdgeInsets.symmetric(horizontal: 4.0),\n   itemBuilder: (context, _) =\u003e Icon(\n     Icons.star,\n     color: Colors.amber,\n   ),\n   onRatingUpdate: (rating) {\n     print(rating);\n   },\n);\n```\n\n###### Second Way:\nUsing `RatingBar()`\n\n![Second Way](images/mode2.jpg) \n```dart\nRatingBar(\n   initialRating: 3,\n   direction: Axis.horizontal,\n   allowHalfRating: true,\n   itemCount: 5,\n   ratingWidget: RatingWidget(\n     full: _image('assets/heart.png'),\n     half: _image('assets/heart_half.png'),\n     empty: _image('assets/heart_border.png'),\n   ),\n   itemPadding: EdgeInsets.symmetric(horizontal: 4.0),\n   onRatingUpdate: (rating) {\n     print(rating);\n   },\n);\n```\nHeart Icons are [Available Here](https://github.com/sarbagyastha/flutter_rating_bar/tree/master/example/assets).\n\n###### Third Way:\nUsing `RatingBar.builder()` with index\n\n![Third Way](images/mode3.jpg) \n```dart\nRatingBar.builder(\n    initialRating: 3,\n    itemCount: 5,\n    itemBuilder: (context, index) {\n       switch (index) {\n          case 0:\n             return Icon(\n                Icons.sentiment_very_dissatisfied,\n                color: Colors.red,\n             );\n          case 1:\n             return Icon(\n                Icons.sentiment_dissatisfied,\n                color: Colors.redAccent,\n             );\n          case 2:\n             return Icon(\n                Icons.sentiment_neutral,\n                color: Colors.amber,\n             );\n          case 3:\n             return Icon(\n                Icons.sentiment_satisfied,\n                color: Colors.lightGreen,\n             );\n          case 4:\n              return Icon(\n                Icons.sentiment_very_satisfied,\n                color: Colors.green,\n              );\n       }\n    },\n    onRatingUpdate: (rating) {\n      print(rating);\n    },\n;\n```\n\n#### Using Flutter Rating Bar Indicator\n\n![Indicator](images/indicator.jpg) \n```dart\nRatingBarIndicator(\n    rating: 2.75,\n    itemBuilder: (context, index) =\u003e Icon(\n         Icons.star,\n         color: Colors.amber,\n    ),\n    itemCount: 5,\n    itemSize: 50.0,\n    direction: Axis.vertical,\n),\n```\n\n#### Vertical Mode\n![Vertical](images/vertical.jpg) \n\nIn order to make the indicator scrollable, just use 'physics' property as in the [example](https://github.com/sarbagyastha/flutter_rating_bar/blob/master/example/lib/main.dart).\n\n## Info\nTo know more about the available properties, head on to [api docs](https://pub.dartlang.org/documentation/flutter_rating_bar/latest/flutter_rating_bar/flutter_rating_bar-library.html).\n\nFeel Free to request any missing features or report issues [here](https://github.com/sarbagyastha/flutter_rating_bar/issues).\n\n## License\n\n```\nCopyright (c) 2021 Sarbagya Dhaubanjar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarbagyastha%2Fflutter_rating_bar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsarbagyastha%2Fflutter_rating_bar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarbagyastha%2Fflutter_rating_bar/lists"}