{"id":21199078,"url":"https://github.com/m3uzz/icon_picker","last_synced_at":"2025-07-10T06:30:56.715Z","repository":{"id":53270725,"uuid":"280526430","full_name":"m3uzz/icon_picker","owner":"m3uzz","description":"A Flutter widget to show an icon collection to pick. This widget extend TextField and has a similar behavior as TextFormField","archived":false,"fork":false,"pushed_at":"2024-01-15T03:45:47.000Z","size":401,"stargazers_count":11,"open_issues_count":6,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-16T03:27:26.985Z","etag":null,"topics":["dart","field","flutter","form","icon","picker","widget"],"latest_commit_sha":null,"homepage":"https://pub.dartlang.org/packages/icon_picker","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m3uzz.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":"2020-07-17T21:14:19.000Z","updated_at":"2022-09-27T11:23:00.000Z","dependencies_parsed_at":"2022-08-27T07:40:28.735Z","dependency_job_id":null,"html_url":"https://github.com/m3uzz/icon_picker","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m3uzz%2Ficon_picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m3uzz%2Ficon_picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m3uzz%2Ficon_picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m3uzz%2Ficon_picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m3uzz","download_url":"https://codeload.github.com/m3uzz/icon_picker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225622889,"owners_count":17498168,"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","field","flutter","form","icon","picker","widget"],"created_at":"2024-11-20T19:56:52.925Z","updated_at":"2024-11-20T19:56:55.192Z","avatar_url":"https://github.com/m3uzz.png","language":"Dart","funding_links":["https://www.buymeacoffee.com/hslbetto"],"categories":[],"sub_categories":[],"readme":"# icon_picker\n\n[![pub package](https://img.shields.io/pub/v/icon_picker.svg)](https://pub.dartlang.org/packages/icon_picker)\n\n\u003ca href=\"https://www.buymeacoffee.com/hslbetto\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-blue.png\" alt=\"Buy Me A Beer\" style=\"width: 150px !important;\"\u003e\u003c/a\u003e\n\nA Flutter widget to show an icon collection to pick.\\\nThis widget extend TextField and has a similar behavior as TextFormField\n\n## Usage\n\nIn the `pubspec.yaml` of your flutter project, add the following dependency:\n\n```yaml\ndependencies:\n  ...\n  icon_picker: \"^2.1.0\"\n```\n\nIn your library add the following import:\n\n```dart\nimport 'package:icon_picker/icon_picker.dart';\n```\n\nFor help getting started with Flutter, view the online [documentation](https://flutter.io/).\n\n## Example\n\nIconPicker use an internal `MaterialIcon` collection by default, but you can set your own icon collection.\\\nYou just need to pass in iconCollection param a `Map\u003cString, IconData\u003e`.\n\n``` dart\nfinal Map\u003cString, IconData\u003e myIconCollection = {\n  'favorite': Icons.favorite,\n  'home': Icons.home,\n  'android': Icons.android,\n  'album': Icons.album,\n  'ac_unit': Icons.ac_unit,\n  ...\n}\n```\n\n``` dart\nIconPicker(\n  initialValue: 'favorite',\n  icon: Icon(Icons.apps),\n  labelText: \"Icon\",\n  title: \"Select an icon\",\n  cancelBtn: \"CANCEL\",\n  enableSearch: true,\n  searchHint: 'Search icon',\n  iconCollection: myIconCollection,\n  onChanged: (val) =\u003e print(val),\n  onSaved: (val) =\u003e print(val),\n);\n```\n\nThe result of val in `onChanged`, `validator` and `onSaved` will be a json String.\\\nSo, if you tap the icon ac_unit in the dialog window, the result value will be:\n\n``` dart\n'{\"iconName\": \"ac_unit\", \"codePoint\": 60219, \"fontFamily\": \"MaterialIcons\"}'\n```\n\nTransforming the `String` result of `IconPicker` in an `IconData`:\n\n``` dart\nString value = '{\"iconName\": \"ac_unit\", \"codePoint\": 60219, \"fontFamily\": \"MaterialIcons\"}'\nvar iconDataJson = jsonDecode(value);\nIconData icon = IconData(iconDataJson['codePoint'], fontFamily: iconDataJson['fontFamily']);\nIcon(icon);\n```\n\n## Preview\n![Overview](https://raw.githubusercontent.com/m3uzz/icon_picker/master/doc/images/icon_picker.gif)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm3uzz%2Ficon_picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm3uzz%2Ficon_picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm3uzz%2Ficon_picker/lists"}