CommonDialog class
通用对话框
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- CommonDialog
Constructors
-
CommonDialog({Key? key, Widget? title, Widget? content, List<
Widget> ? actions, bool showCancel = true, Widget? cancelButton, Widget? confirmButton, String? cancelText, String? confirmText, VoidCallback? onConfirm, VoidCallback? onCancel, EdgeInsets? titlePadding, EdgeInsets? contentPadding, EdgeInsets? actionsPadding, double actionSpacing = 12.0, Color? primaryColor, BorderRadius? borderRadius, bool scrollable = false, bool barrierDismissible = false}) -
const
Properties
-
actions
→ List<
Widget> ? -
自定义操作按钮列表
final
- actionSpacing → double
-
按钮间距
final
- actionsPadding → EdgeInsets?
-
操作按钮内边距
final
- barrierDismissible → bool
-
final
- borderRadius → BorderRadius?
-
对话框圆角
final
- cancelButton → Widget?
-
取消按钮组件
final
- cancelText → String?
-
取消按钮文本
final
- confirmButton → Widget?
-
确认按钮组件
final
- confirmText → String?
-
确认按钮文本
final
- content → Widget?
-
内容组件
final
- contentPadding → EdgeInsets?
-
内容内边距
final
-
底部组件
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onCancel → VoidCallback?
-
取消按钮回调
final
- onConfirm → VoidCallback?
-
确认按钮回调
final
- primaryColor → Color?
-
主色调
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollable → bool
-
是否可滚动
final
- showCancel → bool
-
是否显示取消按钮
final
- title → Widget?
-
标题组件
final
- titlePadding → EdgeInsets?
-
标题内边距
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
Static Methods
-
show<
T> ({required BuildContext context, Widget? title, Widget? content, List< Widget> ? actions, bool showCancel = true, Widget? cancelButton, Widget? confirmButton, String? cancelText, String? confirmText, VoidCallback? onConfirm, VoidCallback? onCancel, EdgeInsets? titlePadding, EdgeInsets? contentPadding, EdgeInsets? actionsPadding, double actionSpacing = 12.0, Color? primaryColor, BorderRadius? borderRadius, bool scrollable = false, bool barrierDismissible = false}) → Future<T?> - 显示对话框的静态方法