削除ボタンを押したら「本当に削除しますか?」の Alert Dialog を出して。「キャンセル」と赤い「削除」の 2 ボタンで、iOS では iOS 風のアラートにして。
# Alert Dialog / アラートダイアログ(確認ダイアログ)
- id: `alert_dialog` URL: https://uizukan.dev/entry/alert_dialog/
- 種別: 表示 / Surfaces & Overlays
- 別名: Dialog, Alert, Confirmation Dialog, Modal Dialog, Popup
- 呼び名: Material 3=Dialogs(Basic dialog) / Material 2=Dialogs(Alert / Simple / Confirmation) / Android (Compose)=AlertDialog / iOS (HIG)=Alerts / SwiftUI=.alert() / Web=<dialog> / Alert and Message Dialogs(WAI-ARIA パターン) / Flutter=AlertDialog / CupertinoAlertDialog
- Flutter: `AlertDialog / CupertinoAlertDialog`
- 関連: action_sheet, modal_bottom_sheet, snackbar, full_screen_dialog
**説明**: 背景を暗くして中央に表示し、タイトル・本文・1〜2 個のボタンで判断を求める。ユーザーの操作を止めるので多用しない。
**使いどころ**: 取り消せない操作(削除・ログアウト)の確認、重要なエラー。軽い通知には Snackbar。
**AI への伝え方(日本語)**: 削除ボタンを押したら「本当に削除しますか?」の Alert Dialog を出して。「キャンセル」と赤い「削除」の 2 ボタンで、iOS では iOS 風のアラートにして。
**Prompt (English)**: When delete is pressed, show an Alert Dialog "Delete this item?" with "Cancel" and a red "Delete" button. Use the iOS-style alert on iOS.
詳細プロンプト は Pro
開発者向け Pro(準備中)で、AI が MCP から直接取りに行けるようになります。名前・デモ・プロンプト・Markdown は無料のままです。
Pro の案内を見る
Flutter コード は Pro
開発者向け Pro(準備中)で、AI が MCP から直接取りに行けるようになります。名前・デモ・プロンプト・Markdown は無料のままです。
Pro の案内を見る