FDialog class

A modal dialog.

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

CLI

To generate a layout for this widget:

dart run forui snippet create adaptive-card

Consider using with

  • showFDialog if you want to show a dialog with consistent Shadcn/ui-like transitions across platforms.
  • showAdaptiveDialog if you want to show a dialog with transitions.

See:

Inheritance

Constructors

FDialog({required Widget builder(BuildContext context, FDialogStyle style), FDialogStyleDelta style = const .context(), Clip clipBehavior = .none, Animation<double>? animation, String? semanticsLabel, BoxConstraints constraints = const BoxConstraints(minWidth: 280, maxWidth: 560), bool resizeToAvoidInsets = true, Key? key})
Creates a FDialog with a custom builder.
const
FDialog.adaptive({required Widget horizontalBuilder(BuildContext context, FDialogStyle style), required Widget verticalBuilder(BuildContext context, FDialogStyle style), FDialogStyleDelta style = const .context(), Clip clipBehavior = .none, Animation<double>? animation, String? semanticsLabel, BoxConstraints constraints = const BoxConstraints(minWidth: 280, maxWidth: 560), bool resizeToAvoidInsets = true, Key? key})
Creates an adaptive FDialog that uses verticalBuilder on FBreakpoints.sm devices and horizontalBuilder on larger devices.

Properties

animation → Animation<double>?
The animation used to animate the dialog's entrance and exit. Settings this to null will disable the animation.
final
builder → Widget Function(BuildContext context, FDialogStyle style)
The builder for the dialog's content.
final
clipBehavior → Clip
The clip behavior applied to the dialog's content.
final
constraints → BoxConstraints
The dialog's box constraints. Defaults to BoxConstraints(minWidth: 280, maxWidth: 560).
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
resizeToAvoidInsets → bool
Whether the dialog should avoid the system's view insets, typically the keyboard. Defaults to true.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticsLabel → String?
The semantic label of the dialog used by accessibility frameworks to announce screen transitions when the dialog is opened and closed.
final
style → FDialogStyleDelta
The dialog's style. Defaults to FThemeData.dialogStyle.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<FDialog>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited