{"id":22726456,"url":"https://github.com/mono0926/adaptive_dialog","last_synced_at":"2026-04-17T03:08:38.859Z","repository":{"id":38199335,"uuid":"248891940","full_name":"mono0926/adaptive_dialog","owner":"mono0926","description":"Show alert dialog or modal action sheet adaptively according to platform.","archived":false,"fork":false,"pushed_at":"2025-03-19T03:31:25.000Z","size":26465,"stargazers_count":371,"open_issues_count":12,"forks_count":64,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-10T06:24:21.318Z","etag":null,"topics":["cupertino","cupertino-design","cupertino-widgets","flutter","ios","material","material-design","material-theme","text","textfield","uitextfield","widget"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/adaptive_dialog","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/mono0926.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["mono0926"]}},"created_at":"2020-03-21T02:24:27.000Z","updated_at":"2025-03-24T19:37:40.000Z","dependencies_parsed_at":"2024-04-19T05:30:38.578Z","dependency_job_id":"f1f059eb-310b-4597-a67a-158711639188","html_url":"https://github.com/mono0926/adaptive_dialog","commit_stats":{"total_commits":297,"total_committers":12,"mean_commits":24.75,"dds":0.05387205387205385,"last_synced_commit":"51ef80a6d64cb56529e29aa8f790cc77c26da18f"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono0926%2Fadaptive_dialog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono0926%2Fadaptive_dialog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono0926%2Fadaptive_dialog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono0926%2Fadaptive_dialog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mono0926","download_url":"https://codeload.github.com/mono0926/adaptive_dialog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292040,"owners_count":22046426,"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":["cupertino","cupertino-design","cupertino-widgets","flutter","ios","material","material-design","material-theme","text","textfield","uitextfield","widget"],"created_at":"2024-12-10T16:17:22.500Z","updated_at":"2026-01-11T13:34:01.748Z","avatar_url":"https://github.com/mono0926.png","language":"Dart","funding_links":["https://github.com/sponsors/mono0926"],"categories":[],"sub_categories":[],"readme":"# adaptive_dialog\n\nShow alert dialog or modal action sheet adaptively according to platform.\n\nWeb Demo: https://mono0926.com/adaptive_dialog/\n\n## [showOkAlertDialog](https://pub.dev/documentation/adaptive_dialog/latest/adaptive_dialog/showOkAlertDialog.html)\n\nConvenient wrapper of [showAlertDialog](https://pub.dev/documentation/adaptive_dialog/latest/adaptive_dialog/showAlertDialog.html).\n\n| iOS                                                                                                                                  | Android                                                                                                                              |\n| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| \u003cimg width=\"497\" alt=\"n1\" src=\"https://user-images.githubusercontent.com/1255062/77220730-59868800-6b86-11ea-823e-ddbcb24d4e27.png\"\u003e | \u003cimg width=\"497\" alt=\"n2\" src=\"https://user-images.githubusercontent.com/1255062/77220731-59868800-6b86-11ea-8521-293cc20b48bb.png\"\u003e |\n\n## [showOkCancelAlertDialog](https://pub.dev/documentation/adaptive_dialog/latest/adaptive_dialog/showOkCancelAlertDialog.html)\n\nConvenient wrapper of [showAlertDialog](https://pub.dev/documentation/adaptive_dialog/latest/adaptive_dialog/showAlertDialog.html).\n\n| iOS                                                                                                                                  | Android                                                                                                                              |\n| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| \u003cimg width=\"497\" alt=\"n3\" src=\"https://user-images.githubusercontent.com/1255062/77220732-5a1f1e80-6b86-11ea-8e1f-beb08e45387a.png\"\u003e | \u003cimg width=\"497\" alt=\"n4\" src=\"https://user-images.githubusercontent.com/1255062/77220733-5a1f1e80-6b86-11ea-8a2a-3f60185877a1.png\"\u003e |\n| \u003cimg width=\"497\" alt=\"n5\" src=\"https://user-images.githubusercontent.com/1255062/77220734-5ab7b500-6b86-11ea-941b-7327f5302c9e.png\"\u003e | \u003cimg width=\"497\" alt=\"n6\" src=\"https://user-images.githubusercontent.com/1255062/77220736-5b504b80-6b86-11ea-9559-cab8f725d6fd.png\"\u003e |\n\n## [showConfirmationDialog](https://pub.dev/documentation/adaptive_dialog/latest/adaptive_dialog/showConfirmationDialog.html)\n\nShow [Confirmation Dialog](https://material.io/components/dialogs#confirmation-dialog). For Cupertino, fallback to ActionSheet.\n\n| iOS                                                                                                                                  | Android                                                                                                                              |\n| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| \u003cimg width=\"497\" alt=\"n3\" src=\"https://user-images.githubusercontent.com/1255062/81771694-a6e7fb80-951e-11ea-89ff-9cd8a5e5074b.png\"\u003e | \u003cimg width=\"497\" alt=\"n5\" src=\"https://user-images.githubusercontent.com/1255062/81771886-2bd31500-951f-11ea-8722-ef4f61575191.png\"\u003e |\n\n## [showModalActionSheet](https://pub.dev/documentation/adaptive_dialog/latest/adaptive_dialog/showModalActionSheet.html)\n\n| iOS                                                                                                                                   | Android                                                                                                                               |\n| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |\n| \u003cimg width=\"497\" alt=\"n7\" src=\"https://user-images.githubusercontent.com/1255062/77220737-5b504b80-6b86-11ea-8f44-49568518717d.png\"\u003e  | \u003cimg width=\"497\" alt=\"n8\" src=\"https://user-images.githubusercontent.com/1255062/77220738-5be8e200-6b86-11ea-9e7d-2067253e766d.png\"\u003e  |\n| \u003cimg width=\"497\" alt=\"n9\" src=\"https://user-images.githubusercontent.com/1255062/77220739-5c817880-6b86-11ea-88e8-b17caba6037d.png\"\u003e  | \u003cimg width=\"497\" alt=\"n10\" src=\"https://user-images.githubusercontent.com/1255062/77220741-5d1a0f00-6b86-11ea-8525-120a0b3849ac.png\"\u003e |\n| \u003cimg width=\"497\" alt=\"n11\" src=\"https://user-images.githubusercontent.com/1255062/77220742-5d1a0f00-6b86-11ea-9991-e1b5677eebf3.png\"\u003e | \u003cimg width=\"497\" alt=\"n12\" src=\"https://user-images.githubusercontent.com/1255062/77220743-5db2a580-6b86-11ea-9d9c-7b474a222c92.png\"\u003e |\n\n## [showTextInputDialog](https://pub.dev/documentation/adaptive_dialog/latest/adaptive_dialog/showTextInputDialog.html)\n\n| iOS                                                                                                                                  | Android                                                                                                                              |\n| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| \u003cimg width=\"516\" alt=\"n1\" src=\"https://user-images.githubusercontent.com/1255062/77243708-6b346200-6c50-11ea-9b54-252accd1df66.png\"\u003e | \u003cimg width=\"516\" alt=\"n2\" src=\"https://user-images.githubusercontent.com/1255062/77243709-6f607f80-6c50-11ea-8b71-a8932adc3dd7.png\"\u003e |\n| \u003cimg width=\"516\" alt=\"n3\" src=\"https://user-images.githubusercontent.com/1255062/77243711-6ff91600-6c50-11ea-8458-56d75b958283.png\"\u003e | \u003cimg width=\"516\" alt=\"n4\" src=\"https://user-images.githubusercontent.com/1255062/77243712-7091ac80-6c50-11ea-8c08-be62e0999267.png\"\u003e |\n\n## [showTextAnswerDialog](https://pub.dev/documentation/adaptive_dialog/latest/adaptive_dialog/showTextAnswerDialog.html)\n\nShow text input dialog until answer is correct or cancelled.\nThis is useful for preventing very destructive action is executed mistakenly.\n\n| iOS                                                                                                                                  | Android                                                                                                                              |\n| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| \u003cimg width=\"516\" alt=\"n5\" src=\"https://user-images.githubusercontent.com/1255062/77243713-712a4300-6c50-11ea-81d4-75d7961d9224.png\"\u003e | \u003cimg width=\"516\" alt=\"n6\" src=\"https://user-images.githubusercontent.com/1255062/77243714-71c2d980-6c50-11ea-8bed-aa6b4dfcba0a.png\"\u003e |\n\n---\n\n# FAQ\n\n## How can I customize it flexibly?\n\nThis packages keeps usage and UI simple like iOS official alert dialog.\nTherefore, if you need more flexibility than this package provides, I recommend that you build your own directly using standard APIs to meet your requirements without using this package.\n\n- https://github.com/mono0926/adaptive_dialog/issues/19#issuecomment-754476937\n- https://github.com/mono0926/adaptive_dialog/issues/76#issuecomment-1120686982\n- https://github.com/mono0926/adaptive_dialog/issues/108#issuecomment-1543068734\n\n## The getter `modalBarrierDismissLabel` was called on null\n\n`adaptive_dialog` uses Cupertino-style widgets internally on iOS, so `GlobalCupertinoLocalizations.delegate` is required under certain conditions.\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:flutter_localizations/flutter_localizations.dart';\n\nclass App extends StatelessWidget {\n  const App({Key key}) : super(key: key);\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      //...\n      localizationsDelegates: const [\n        GlobalMaterialLocalizations.delegate,\n        GlobalWidgetsLocalizations.delegate,\n        GlobalCupertinoLocalizations.delegate, // This is required\n      ],\n    );\n  }\n}\n```\n\n## The input text color same with backgound when using CupertinoTextInputDialog\n\nThis fixes the problem.\n\n```dart\nimport 'package:flutter/cupertino.dart';\nimport 'package:flutter/material.dart' hide Router;\n\nclass App extends StatelessWidget {\n  const App({Key key}) : super(key: key);\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      darkTheme: ThemeData(\n        cupertinoOverrideTheme: const CupertinoThemeData(\n          textTheme: CupertinoTextThemeData(), // This is required\n        ),\n      ),\n    );\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmono0926%2Fadaptive_dialog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmono0926%2Fadaptive_dialog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmono0926%2Fadaptive_dialog/lists"}