NiceDialog<T> class
An AlertDialog with a scrollable or constrained content and cancel, close and submit actions.
The dialog closes once when the submit action completes with true, with the value of submitResult; a submit
is ignored while another is running, and a result arriving after the dialog has been popped closes nothing.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- NiceDialog
Constructors
-
NiceDialog({Key? key, Widget? title, EdgeInsetsGeometry titlePadding = const EdgeInsets.only(left: 24, top: 12, right: 24, bottom: 8), ShapeBorder shape = const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(8))), EdgeInsetsGeometry actionsPadding = const EdgeInsets.symmetric(horizontal: 16, vertical: 8), ObservableData<
bool> ? actionsEnabled, bool actionClose = false, bool actionCancel = true, bool actionSubmit = true, bool actionSubmitAutofocus = true, bool contentExpanded = false, bool contentScrollable = false, BoxConstraints contentConstraints = kIsWeb ? const BoxConstraints(minWidth: 420, maxWidth: 552, minHeight: 24, maxHeight: 420) : const BoxConstraints(minWidth: 320, maxWidth: 420, minHeight: 24, maxHeight: 280), EdgeInsetsGeometry contentPadding = const EdgeInsets.only(left: 24, right: 24, bottom: 8), required Widget content, ValueGetter<FutureOr< submitForm = _defaultSubmitForm, ValueGetter<bool> >T> ? submitResult}) -
Creates a dialog showing
content.const
Properties
- actionCancel → bool
-
Whether to show a cancel action.
final
- actionClose → bool
-
Whether to show a close action.
final
-
actionsEnabled
→ ObservableData<
bool> ? -
Enables or disables the actions from outside; they are enabled when
null.final - actionsPadding → EdgeInsetsGeometry
-
Padding around the actions.
final
- actionSubmit → bool
-
Whether to show a submit action.
final
- actionSubmitAutofocus → bool
-
Whether the submit action takes the focus.
final
- content → Widget
-
The content of the dialog.
final
- contentConstraints → BoxConstraints
-
Constraints of the content.
final
- contentExpanded → bool
-
Whether the content fills the constraints instead of wrapping itself.
final
- contentPadding → EdgeInsetsGeometry
-
Padding around the content.
final
- contentScrollable → bool
-
Whether the content scrolls.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shape → ShapeBorder
-
Shape of the dialog.
final
-
submitForm
→ ValueGetter<
FutureOr< bool> > -
Validates and saves the form; the dialog closes if it returns
true.final -
submitResult
→ ValueGetter<
T> ? -
Value the dialog closes with after a successful submit.
final
- title → Widget?
-
Title of the dialog.
final
- titlePadding → EdgeInsetsGeometry
-
Padding around the title.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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.
inherited
-
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