Skip to content
pubscout

confirm_dialog

1.0.4, released 2 years ago by an unverified publisher

An easy-to-use confirm dialog widget for Flutter with a JS-like syntax.

WASM-ready
$ flutter pub add confirm_dialog
Source repository

What it does

Provides a simple function call to display a confirmation dialog matching the app's theme. It returns a Future resolving to a boolean depending on whether the user pressed OK or Cancel.

AI-written summary of version 1.0.4, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a quick confirmation dialog with minimal boilerplate.
  • You want a JS-like confirm experience in Flutter.

Skip it when

  • You require a complex multi-step wizard or custom non-standard dialog layouts.
  • You manage dialog state through a rigid declarative routing state machine.

Strengths

  • Very simple and quick setup.
  • Follows app's theme out of the box.

Weaknesses

  • Limited to a basic confirmation flow with standard buttons.
  • Minimal customizability beyond basic title, content, and button text widgets.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
if (await confirm(context)) {
  print('pressedOK');
} else {
  print('pressedCancel');
}

Alternatives

Packages that do the same job and could replace confirm_dialog.