Skip to content
pubscout

relative_dialog

0.2.1, released 3 years ago by an unverified publisher

A Flutter package for displaying a dialog relative to another widget.

WASM-ready
$ flutter pub add relative_dialog
Source repository

What it does

It allows Flutter developers to display a dialog positioned relative to a specific target widget. It supports an anchor widget approach or an imperative method call, along with customizable animations.

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

Use it when

  • You need to show a popup or dialog positioned relative to a specific anchor widget
  • You want custom animations for dialog transitions relative to a target

Skip it when

  • You need standard center-screen modal dialogs provided by Flutter out of the box

Strengths

  • Supports both an anchor widget and an imperative API
  • Allows custom transition animations
  • Customizable barrier dismissibility

Weaknesses

  • Limited documentation beyond basic demos
  • No advanced layout or alignment helpers mentioned beyond basic alignments

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
Builder(
  builder: (context) {
    return ElevatedButton(
      child: Text('Show relative dialog'),
      onPressed: () {
        showRelativeDialog(
          context: context,
          alignment: Alignment.topRight,
          builder: (context) {
            return Text(
              'Done!',
              style: TextStyle(
                color: Colors.white,
              ),
            );
          },
        );
      },
    );
  },
)

Alternatives

Packages that do the same job and could replace relative_dialog.