DocumentationOverlayDialog

Dialog

A modal dialog interrupts the user with important content and expects a response.

Usage

FDialog(...)

FDialog(
  direction: Axis.horizontal,
  title: const Text('Are you absolutely sure?'),
  body: const Text('This action cannot be undone. This will permanently delete your account and remove your data from our servers.'),
  actions: [
    FButton(style: FButtonStyle.outline, label: const Text('Cancel'), onPress: () => Navigator.of(context).pop()),
    FButton(label: const Text('Continue'), onPress: () => Navigator.of(context).pop()),
  ],
);

FDialog.adaptive(...)

FDialog.adaptive(
  title: const Text('Are you absolutely sure?'),
  body: const Text('This action cannot be undone. This will permanently delete your account and remove your data from our servers.'),
  actions: [
    FButton(style: FButtonStyle.outline, label: const Text('Cancel'), onPress: () => Navigator.of(context).pop()),
    FButton(label: const Text('Continue'), onPress: () => Navigator.of(context).pop()),
  ],
);

FDialog.raw(...)

FDialog.raw(
  child: const Placeholder(),
);

Examples

Horizontal Layout

Vertical Layout

We recommend using the vertical layout on mobile devices.