{"id":13789863,"url":"https://github.com/best-flutter/easy_alert","last_synced_at":"2026-01-11T04:52:28.038Z","repository":{"id":56828376,"uuid":"148010889","full_name":"best-flutter/easy_alert","owner":"best-flutter","description":"A package for flutter to use alert and toast within one line code.","archived":false,"fork":false,"pushed_at":"2020-01-19T12:24:52.000Z","size":137,"stargazers_count":32,"open_issues_count":5,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T03:51:13.128Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/best-flutter.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":"2018-09-09T09:25:30.000Z","updated_at":"2024-07-09T09:51:01.000Z","dependencies_parsed_at":"2022-08-28T21:10:39.548Z","dependency_job_id":null,"html_url":"https://github.com/best-flutter/easy_alert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/best-flutter%2Feasy_alert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/best-flutter%2Feasy_alert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/best-flutter%2Feasy_alert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/best-flutter%2Feasy_alert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/best-flutter","download_url":"https://codeload.github.com/best-flutter/easy_alert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248897220,"owners_count":21179559,"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":[],"created_at":"2024-08-03T22:00:33.907Z","updated_at":"2026-01-11T04:52:28.026Z","avatar_url":"https://github.com/best-flutter.png","language":"Dart","funding_links":[],"categories":["Packages"],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pub.dartlang.org/packages/easy_alert\"\u003e\n        \u003cimg src=\"https://img.shields.io/pub/v/easy_alert.svg\" alt=\"pub package\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n# easy_alert\n\nA package for flutter to use alert and toast within one line code.\n\n## Getting Started\n\nAdd \n\n```\n    easy_alert:\n```\n\nto your pubspec.yaml, and run `flutter packages get` in your project root directory.\n\n\n## Showcases\n\n![](https://github.com/jzoom/images/raw/master/toast.gif)\n![](https://github.com/jzoom/images/raw/master/alert.gif)\n\n\n## ROADMAP\n\n* [x] alert\n* [x] ios style alert\n* [x] confirm\n* [x] ios style confirm\n* [x] toast\n* [ ] customize alert dialog\n* [ ] customize toast\n* [ ] support bottom sheet.\n* [x] support input\n* [x] support pick and select\n\n##  Integrate with your flutter app\n\n```\nvoid main() =\u003e runApp(new AlertProvider(\n      child: new YourApp(),\n      config: new AlertConfig(\n        ok: \"OK text for `ok` button in AlertDialog\", \n        cancel: \"CANCEL text for `cancel` button in AlertDialog\"),\n    ));\n```\n\n\n\n\n## alert\n\n```\n  Alert.alert(context, title: \"Hello\", content: \"this is a alert\")\n      .then((_) =\u003e Alert.toast(context, \"You just click ok\"));\n\n```\n\n## confirm\n\n```\n Alert.confirm(context, title: \"Hello\", content: \"this is a alert\")\n          .then((int ret) =\u003e\n              Alert.toast(context, ret == Alert.OK ? \"ok\" : \"cancel\"));\n```\n\n## toast\n\n```\nAlert.toast(context,\"Very long toast\",position: ToastPosition.bottom, duration: ToastDuration.long);\n```\n\n\n## pick\n\n```\ntry {\n  int index = await Alert.pick(context,\n      values: widget.values, index: widget.index);\n    ...have selected\n} catch (e) {\n    ... cancel select\n}\n```\n\n\n```\n\n\ntry {\n    String ret = await Alert.select(context,\n        options: [\n          Option('A', 'a'),\n          Option('B', 'b'),\n          Option('C', 'c'),\n        ],\n        value: 'a');\nAlert.toast(context, \"You just pick $ret\");\n} catch (e) {\nAlert.toast(context, \"Canceled\",\n    position: ToastPosition.center);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbest-flutter%2Feasy_alert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbest-flutter%2Feasy_alert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbest-flutter%2Feasy_alert/lists"}