{"id":15436113,"url":"https://github.com/m3uzz/select_form_field","last_synced_at":"2025-04-19T18:34:30.101Z","repository":{"id":41874419,"uuid":"280036173","full_name":"m3uzz/select_form_field","owner":"m3uzz","description":"A Flutter select form field widget. It shows a list of options in a dropdown menu.","archived":false,"fork":false,"pushed_at":"2023-03-01T13:51:48.000Z","size":187,"stargazers_count":8,"open_issues_count":14,"forks_count":14,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-29T11:41:39.233Z","etag":null,"topics":["dart","field","flutter","form","select","widget"],"latest_commit_sha":null,"homepage":"https://pub.dartlang.org/packages/select_form_field","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-16T02:50:51.000Z","updated_at":"2022-09-14T11:00:55.000Z","dependencies_parsed_at":"2024-06-21T13:53:32.180Z","dependency_job_id":null,"html_url":"https://github.com/m3uzz/select_form_field","commit_stats":{"total_commits":12,"total_committers":3,"mean_commits":4.0,"dds":0.25,"last_synced_commit":"adedfee272f3486c9061348d851032d7a190ecad"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m3uzz%2Fselect_form_field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m3uzz%2Fselect_form_field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m3uzz%2Fselect_form_field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m3uzz%2Fselect_form_field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m3uzz","download_url":"https://codeload.github.com/m3uzz/select_form_field/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249239250,"owners_count":21235824,"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","select","widget"],"created_at":"2024-10-01T18:48:23.042Z","updated_at":"2025-04-16T12:30:45.459Z","avatar_url":"https://github.com/m3uzz.png","language":"Dart","funding_links":["https://www.buymeacoffee.com/hslbetto"],"categories":[],"sub_categories":[],"readme":"# select_form_field\n\n[![pub package](https://img.shields.io/pub/v/select_form_field.svg)](https://pub.dartlang.org/packages/select_form_field)\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 select field widget. It shows a list of options in a dropdown menu.\\\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  select_form_field: \"^2.2.0\"\n```\n\nIn your library add the following import:\n\n```dart\nimport 'package:select_form_field/select_form_field.dart';\n```\n\nFor help getting started with Flutter, view the online [documentation](https://flutter.io/).\n\n## Example\n\nSet items using a List map passing:\n* `value`: [String], \n* `textStyle`: [TextStyle | null],\n* `label`: [String | null], \n* `icon`: [Widget | null],\n* `enable`: [bool | null],\n\n``` dart\nfinal List\u003cMap\u003cString, dynamic\u003e\u003e _items = [\n  {\n    'value': 'boxValue',\n    'label': 'Box Label',\n    'icon': Icon(Icons.stop),\n  },\n  {\n    'value': 'circleValue',\n    'label': 'Circle Label',\n    'icon': Icon(Icons.fiber_manual_record),\n    'textStyle': TextStyle(color: Colors.red),\n  },\n  {\n    'value': 'starValue',\n    'label': 'Star Label',\n    'enable': false,\n    'icon': Icon(Icons.grade),\n  },\n];\n```\n\n``` dart\nSelectFormField(\n  type: SelectFormFieldType.dropdown, // or can be dialog\n  initialValue: 'circle',\n  icon: Icon(Icons.format_shapes),\n  labelText: 'Shape',\n  items: _items,\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 String.\\\nSo, if you tap on Box Label item on select menu the result will be `boxValue`.\n\n## Preview\n![Overview](https://raw.githubusercontent.com/m3uzz/select_form_field/master/doc/images/select_form_field.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm3uzz%2Fselect_form_field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm3uzz%2Fselect_form_field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm3uzz%2Fselect_form_field/lists"}