{"id":32288637,"url":"https://github.com/vantuan88291/flutter_dropdown_alert","last_synced_at":"2026-02-22T12:03:03.540Z","repository":{"id":45562836,"uuid":"343681029","full_name":"vantuan88291/flutter_dropdown_alert","owner":"vantuan88291","description":"Flutter Dropdown Alert help to notify to user when success, warning or error like in app push notification","archived":false,"fork":false,"pushed_at":"2023-01-06T06:31:19.000Z","size":291,"stargazers_count":13,"open_issues_count":3,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-08-20T21:58:02.636Z","etag":null,"topics":["alert","dropdown","flutter","local-push-notifications","notification","push-notification","widget"],"latest_commit_sha":null,"homepage":"","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/vantuan88291.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":"2021-03-02T07:18:35.000Z","updated_at":"2023-06-12T14:21:10.000Z","dependencies_parsed_at":"2023-02-05T13:16:19.591Z","dependency_job_id":null,"html_url":"https://github.com/vantuan88291/flutter_dropdown_alert","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"purl":"pkg:github/vantuan88291/flutter_dropdown_alert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vantuan88291%2Fflutter_dropdown_alert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vantuan88291%2Fflutter_dropdown_alert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vantuan88291%2Fflutter_dropdown_alert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vantuan88291%2Fflutter_dropdown_alert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vantuan88291","download_url":"https://codeload.github.com/vantuan88291/flutter_dropdown_alert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vantuan88291%2Fflutter_dropdown_alert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29711636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T10:34:24.778Z","status":"ssl_error","status_checked_at":"2026-02-22T10:32:23.200Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["alert","dropdown","flutter","local-push-notifications","notification","push-notification","widget"],"created_at":"2025-10-23T02:33:45.822Z","updated_at":"2026-02-22T12:03:03.524Z","avatar_url":"https://github.com/vantuan88291.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![pub package](https://img.shields.io/pub/v/flutter_dropdown_alert.svg)](https://pub.dartlang.org/packages/flutter_dropdown_alert)\n\n# flutter_dropdown_alert\n\nA dropdown alert package for flutter\n\nDropdown alert will help to notify to user when you call api success, error or something like that, such as in app notification. It's will similar with push notification but you can custom more than that. You can show alert at anywhere without widget.\n\n## Demo\n\n### Top:\n![](https://github.com/vantuan88291/flutter_dropdown_alert/raw/master/screenshot/dropdown.gif)\n\n### Bottom:\n![](https://github.com/vantuan88291/flutter_dropdown_alert/raw/master/screenshot/demo-2.png)\n\n##  How to use it.\n\n```yaml\n# pubspec.yaml\n\ndependencies:\n  flutter:\n    sdk: flutter\n  flutter_dropdown_alert: \u003clast-version\u003e\n```\n\nJust create a `Stack` widget and add `DropdownAlert()` inside `MaterialApp` which should be in main.dart like this:\n```dart\nimport 'package:flutter_dropdown_alert/dropdown_alert.dart';\n```\n\n```dart\n MaterialApp(\n       title: 'Dropdown Alert Demo',\n       theme: ThemeData(\n         visualDensity: VisualDensity.adaptivePlatformDensity,\n       ),\n       builder: (context, child) =\u003e Stack(\n         children: [\n            child!,\n            DropdownAlert()\n         ],\n       ),\n       home: MyHomePage(title: 'Flutter Dropdown Alert Demo'),\n     );\n```\n\n## Full example source code:\nhttps://github.com/vantuan88291/flutter_bloc_modular\n\n## Show alert anywhere, even inside bloc without widget:\n\nNext, import 'alert_controller.dart' into your dart code\n\n```dart\nimport 'package:flutter_dropdown_alert/alert_controller.dart';\n```\n\n```dart\n   AlertController.show(\"Title\", \"message here!\", TypeAlert.success, payload);\n```\n\nThe `payload` param is `Map\u003cString, dynamic\u003e`, this param is optional, should use to give data into the alert and get it when click on alert.\n\n## Hide alert:\nThe alert will automatically hide, but if you use `delayDismiss: 0`, it will freeze and not auto hide, you have to hide the alert by this code:\n```dart\n   AlertController.hide();\n```\n\n## Listener when click on alert:\n\nThere are 2 ways to do that:\n\n- Using listener of controller, put this code inside `initState()` of widget:\n```dart\n   AlertController.onTabListener((Map\u003cString, dynamic\u003e? payload, TypeAlert type) {\n         print(\"$payload - $type\");\n       });\n```\n- Using param `onTap`:\n```dart\n   DropdownAlert(onTap: (Map\u003cString, dynamic\u003e payload?, TypeAlert type) {\n                print(\"$payload - $type\");\n             },)\n```\n\n\n\n## TypeAlert\n| Type                       | description                                                                           |\n| -------------------------- | ------------------------------------------------------------------------------------- |\n| TypeAlert.success          | Type when action success, the background of alert will green                          |\n| TypeAlert.warning          | Type when action warning, the background of alert will brown                          |\n| TypeAlert.error            | Type when action error, the background of alert will red                              |\n\n\n## parameters\n| parameter                  | description                                                                           | default                                                                                                                                                                               |\n| -------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| onTap                      | Callback when tab to alert, will give: Function(Map\u003cString, dynamic\u003e, TypeAlert)      | null                                                                                                                                                                                  |\n| successImage               | Image.asset() of success alert, uri of assets image                                   | Icon widget                                                                                                                                                                           |\n| warningImage               | Image.asset() of warning alert, uri of assets image                                   | Icon widget                                                                                                                                                                           |\n| errorImage                 | Image.asset() of error alert, uri of assets image                                     | Icon widget                                                                                                                                                                           |\n| closeImage                 | Image.asset() of close image, when showCloseButton is true                            | Icon widget                                                                                                                                                                           |\n| errorBackground            | Color of background when error                                                        | Colors.red                                                                                                                                                                            |\n| successBackground          |                                                                                       | Colors.green                                                                                                                                                                          |\n| warningBackground          |                                                                                       | 0xFFCE863D                                                                                                                                                                            |\n| titleStyle                 | TextStyle of title                                                                    |                                                                                                                                                                                       |\n| contentStyle               | TextStyle of content                                                                  |                                                                                                                                                                                       |\n| maxLinesTitle              |                                                                                       | null                                                                                                                                                                                  |\n| maxLinesContent            |                                                                                       | null                                                                                                                                                                                  |\n| duration                   | duration of animation                                                                 | 300                                                                                                                                                                                   |\n| delayDismiss               | delay time when alert auto dismiss, set to 0 if you want to freeze alert              | 3000                                                                                                                                                                                  |\n| position                   | show the position of alert, include: AlertPosition.TOP, AlertPosition.BOTTOM          | AlertPosition.TOP                                                                                                                                                                     |\n| showCloseButton            | When close button is present, only can click on button close to hide the alert        | false                                                                                                                                                                    |\n| avoidBottomInset           | Add optional variable for inset overlap                                               | false                                                                                                                                                                    |\n\n\n`The ideal from react-native-dropdownalert`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvantuan88291%2Fflutter_dropdown_alert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvantuan88291%2Fflutter_dropdown_alert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvantuan88291%2Fflutter_dropdown_alert/lists"}