{"id":15550028,"url":"https://github.com/outdatedguy/list_picker","last_synced_at":"2026-01-11T13:35:49.772Z","repository":{"id":54332970,"uuid":"464651784","full_name":"OutdatedGuy/list_picker","owner":"OutdatedGuy","description":"Flutter package to select item from a given list using a dialog","archived":false,"fork":false,"pushed_at":"2024-08-01T17:37:18.000Z","size":1477,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T02:22:52.859Z","etag":null,"topics":["dart","flutter","flutter-package","package"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/list_picker","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OutdatedGuy.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-02-28T21:35:18.000Z","updated_at":"2024-08-01T17:37:10.000Z","dependencies_parsed_at":"2023-02-14T15:16:24.282Z","dependency_job_id":null,"html_url":"https://github.com/OutdatedGuy/list_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/OutdatedGuy%2Flist_picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutdatedGuy%2Flist_picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutdatedGuy%2Flist_picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutdatedGuy%2Flist_picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OutdatedGuy","download_url":"https://codeload.github.com/OutdatedGuy/list_picker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245579675,"owners_count":20638679,"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","flutter","flutter-package","package"],"created_at":"2024-10-02T13:47:23.942Z","updated_at":"2026-01-11T13:35:49.715Z","avatar_url":"https://github.com/OutdatedGuy.png","language":"C++","readme":"# List Picker\n\nlist_picker helps you to select an item from a list of items using dialog box without having to write a lot of code.\n\n[![pub package][package_svg]][package]\n[![GitHub][license_svg]](LICENSE)\n\n[![GitHub issues][issues_svg]][issues]\n[![GitHub issues closed][issues_closed_svg]][issues_closed]\n\n\u003chr /\u003e\n\n## Features\n\n- `ListPickerField` provides a text field which when tapped opens the dialog box to select item from the given list.\n- You can also customize `showDialog` and its `builder` method with `ListPickerDialog` widget.\n- Or you can call the `showPickerDialog` function on your custom widget.\n\n![demo](https://user-images.githubusercontent.com/74326345/159289415-25f263a2-6ba3-40fd-ad12-17c38e2bcf28.gif)\n\n## Getting started\n\n#### Add to Dependencies\n\n```yaml\nlist_picker: ^1.2.0\n```\n\n#### Import the package\n\n```dart\nimport 'package:list_picker/list_picker.dart';\n```\n\n## Usage\n\n#### Using variable for the Widget to get values\n\n```dart\nclass VariableDemo extends StatelessWidget {\n  VariableDemo({Key? key}) : super(key: key);\n\n  final listPickerField = ListPickerField(\n    label: \"Fruit\",\n    items: const [\"Apple\", \"Banana\", \"Orange\", \"Pineapple\"],\n  );\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      body: Center(\n        child: listPickerField,\n      ),\n    );\n  }\n}\n```\n\n#### Using controller to get values\n\n```dart\nclass ControllerDemo extends StatelessWidget {\n  ControllerDemo({Key? key}) : super(key: key);\n\n  final controller = TextEditingController();\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      body: Center(\n        child: ListPickerField(\n          label: \"Fruit\",\n          items: const [\"Apple\", \"Banana\", \"Orange\", \"Pineapple\"],\n          controller: controller,\n        ),\n      ),\n    );\n  }\n}\n```\n\n#### Using showPickerDialog function on custom widget\n\n```dart\nclass DialogFunctionDemo extends StatelessWidget {\n  const DialogFunctionDemo({Key? key}) : super(key: key);\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      body: Center(\n        child: ElevatedButton(\n          onPressed: () async {\n            String? fruit = await showPickerDialog(\n              context: context,\n              label: \"Fruit\",\n              items: const [\"Apple\", \"Banana\", \"Orange\", \"Pineapple\"],\n            );\n\n            ScaffoldMessenger.of(context).showSnackBar(\n              SnackBar(\n                content: Text(fruit ?? \"No fruit selected\"),\n              ),\n            );\n          },\n          child: const Text(\"Select Your Favourite fruit\"),\n        ),\n      ),\n    );\n  }\n}\n```\n\n#### Using ListPickerDialog Widget for custom use\n\n```dart\nclass ListPickerDialogDemo extends StatelessWidget {\n  const ListPickerDialogDemo({Key? key}) : super(key: key);\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      body: Center(\n        child: ElevatedButton(\n          onPressed: () async {\n            String? fruit = await showDialog(\n              context: context,\n              builder: (context) =\u003e Scaffold(\n                appBar: AppBar(\n                  title: const Text('List Picker Dialog'),\n                ),\n                body: const ListPickerDialog(\n                  label: \"Fruit\",\n                  items: [\"Apple\", \"Banana\", \"Orange\", \"Pineapple\"],\n                ),\n              ),\n            );\n\n            ScaffoldMessenger.of(context).showSnackBar(\n              SnackBar(\n                content: Text(fruit ?? \"No fruit selected\"),\n              ),\n            );\n          },\n          child: const Text(\"Select Your Favourite fruit\"),\n        ),\n      ),\n    );\n  }\n}\n```\n\n## ListPickerField Getter Methods\n\n- value: returns the selected value\n- empty: returns true if no value is selected\n\n### If you liked the package, then please give it a [Like 👍🏼][package] and [Star ⭐][repository]\n\n\u003c!-- Badges URLs --\u003e\n\n[package_svg]: https://img.shields.io/pub/v/list_picker.svg?color=blueviolet\n[license_svg]: https://img.shields.io/github/license/OutdatedGuy/list_picker.svg?color=purple\n[issues_svg]: https://img.shields.io/github/issues/OutdatedGuy/list_picker.svg\n[issues_closed_svg]: https://img.shields.io/github/issues-closed/OutdatedGuy/list_picker.svg?color=green\n\n\u003c!-- Links --\u003e\n\n[package]: https://pub.dev/packages/list_picker\n[repository]: https://github.com/OutdatedGuy/list_picker\n[issues]: https://github.com/OutdatedGuy/list_picker/issues\n[issues_closed]: https://github.com/OutdatedGuy/list_picker/issues?q=is%3Aissue+is%3Aclosed\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutdatedguy%2Flist_picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foutdatedguy%2Flist_picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutdatedguy%2Flist_picker/lists"}