PhoenixDialog class

高度灵活的通用的弹窗组件

布局规则: 弹窗由五部分组成:Icon、标题、内容、警示、按钮操作区域。 每一部分都可以显示或者不显示。

有两种使用方式: 1:系统的showDialog 无标题、单按钮 showDialog

2:使用对话框管理器 无标题、单按钮 void _showStyle1Dialog(BuildContext context) { DialogManager.showSingleButtonDialog(context, label: "知道了", message: "辅助内容信息辅助内容信息辅助内容信息辅助内容信息辅助内容信息", onTap: () { BrnToast.show('知道了', context); }); }

Inheritance

Constructors

PhoenixDialog({Key? key, bool showIcon = false, Image? iconImage, String? titleText, String? messageText, Widget? titleWidget, Widget? contentWidget, String? warningText, Widget? warningWidget, List<Widget>? actionsWidget, Divider divider = cDividerLine, VerticalDivider verticalDivider = cVerticalDivider, List<String>? actionsText, DialogIndexedActionClickCallback? indexedActionCallback, DialogConfig? themeData, int titleMaxLines = cTitleMaxLines})
const

Properties

actions List<Widget>?
The (optional) set of actions that are displayed at the bottom of the dialog with an OverflowBar.
finalinherited
actionsAlignment MainAxisAlignment?
Defines the horizontal layout of the actions according to the same rules as for Row.mainAxisAlignment.
finalinherited
actionsOverflowAlignment OverflowBarAlignment?
The horizontal alignment of actions within the vertical "overflow" layout.
finalinherited
actionsOverflowButtonSpacing double?
The spacing between actions when the OverflowBar switches to a column layout because the actions don't fit horizontally.
finalinherited
actionsOverflowDirection VerticalDirection?
The vertical direction of actions if the children overflow horizontally.
finalinherited
actionsPadding EdgeInsetsGeometry?
Padding around the set of actions at the bottom of the dialog.
finalinherited
actionsText List<String>?
底部按钮文案
final
actionsWidget List<Widget>?
按钮部分控件
final
alignment AlignmentGeometry?
How to align the Dialog.
finalinherited
backgroundColor Color?
The background color of the surface of this Dialog.
finalinherited
buttonPadding EdgeInsetsGeometry?
The padding that surrounds each button in actions.
finalinherited
clipBehavior Clip?
Controls how the contents of the dialog are clipped (or not) to the given shape.
finalinherited
content Widget?
The (optional) content of the dialog is displayed in the center of the dialog in a lighter font.
finalinherited
contentPadding EdgeInsetsGeometry?
Padding around the content.
finalinherited
contentTextStyle TextStyle?
Style for the text in the content of this AlertDialog.
finalinherited
contentWidget Widget?
内容控件
final
divider Divider
水平分割线
final
elevation double?
The z-coordinate of this Dialog.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
icon Widget?
An optional icon to display at the top of the dialog.
finalinherited
iconColor Color?
Color for the Icon in the icon of this AlertDialog.
finalinherited
iconImage Image?
头部的icon
final
iconPadding EdgeInsetsGeometry?
Padding around the icon.
finalinherited
indexedActionCallback DialogIndexedActionClickCallback?
底部按钮的点击监听回调
final
insetPadding EdgeInsets?
The amount of padding added to MediaQueryData.viewInsets on the outside of the dialog. This defines the minimum space between the screen's edges and the dialog.
finalinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
messageText String?
内容文本
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollable bool
Determines whether the title and content widgets are wrapped in a scrollable.
finalinherited
semanticLabel String?
The semantic label of the dialog used by accessibility frameworks to announce screen transitions when the dialog is opened and closed.
finalinherited
shadowColor Color?
The color used to paint a drop shadow under the dialog's Material, which reflects the dialog's elevation.
finalinherited
shape ShapeBorder?
The shape of this dialog's border.
finalinherited
showIcon bool
是否展示头部icon
final
surfaceTintColor Color?
The color used as a surface tint overlay on the dialog's background color, which reflects the dialog's elevation.
finalinherited
themeData DialogConfig?
dialog配置
final
title Widget?
The (optional) title of the dialog is displayed in a large font at the top of the dialog, below the (optional) icon.
finalinherited
titleMaxLines int
标题最大行数
final
titlePadding EdgeInsetsGeometry?
Padding around the title.
finalinherited
titleText String?
-----如果以上属性设置了,那么对话框中的相对应的部分 以他们为基准 标题文本
final
titleTextStyle TextStyle?
Style for the text in the title of this AlertDialog.
finalinherited
titleWidget Widget?
标题控件
final
verticalDivider VerticalDivider
根据以上属性 生成对应的text控件 垂直分割线
final
warningText String?
警示文本
final
warningWidget Widget?
警示文案部分的控件
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