Fluent2Dialog class
Fluent 2's Dialog, its surface drawn in place: the surface centred over the
overlay, at most 600 wide, its corners 8, 24 round its parts, in shadow64;
the title in subtitle1, the message and content 8 under it in body1,
the actions 24 under that at the end, 8 apart, the primary last (on a
narrow phone they stack, the primary on top). An alert dialog: no dismiss in
its head, closed by its own acts. Raise one with show or confirm.
Fluent2Dialog(title: 'Delete Q3 plan.docx?', content: const Text('It moves to the recycle bin for 30 days.'), actions: [Fluent2Button('Cancel', onPressed: cancel), Fluent2Button('Delete', appearance: Fluent2ButtonAppearance.primary, onPressed: delete)])
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- Fluent2Dialog
Constructors
-
Fluent2Dialog({Fluent2Style? style, Key? key, required String title, String? message, Widget? content, List<
Widget> actions = const []}) -
A dialog titled
title.const
Properties
-
actions
→ List<
Widget> -
The acts, the primary last.
final
- content → Widget?
-
Whatever the words alone cannot say.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- message → String?
-
Its words, in body1 under the title; content follows them.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → Fluent2Style?
-
This dialog's own look, slot by slot, over its component theme
(Fluent2ThemeData.dialogTheme): the slots its doc names.
final
- title → String
-
The dialog's 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.
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
Static Methods
-
confirm(
BuildContext context, {required String title, String? message, String? confirmLabel, String? cancelLabel}) → Future< bool?> -
Asks
title(withmessage), an alert dialog to a screen reader, and completes true onconfirmLabel, false oncancelLabel, null when dismissed. Fluent 2 has no danger button: a loss is the primary act whose words say it ('Delete'). The labels default to "OK" and "Cancel" in the app's language. -
show<
T> (BuildContext context, Widget dialog(BuildContext context), {bool isAlert = false}) → Future< T?> -
Raises
dialogover the whole app; completes with the value it pops with (null when the overlay is tapped or Escape pressed).