AbnormalStateWidget class
异常页面展示一般用于网络错误、数据为空的提示和引导
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- AbnormalStateWidget
Constructors
-
AbnormalStateWidget({Key? key, Image? img, String? title, String? content, OperateAreaType operateAreaType = OperateAreaType.textButton, List<
String> ? operateTexts, EmptyStatusIndexedActionClickCallback? action, bool enablePageTap = false, double? topOffset, Color bgColor = Colors.white, bool isCenterVertical = false, double topPercent = 0.08, AbnormalStateConfig? themeData})
Properties
- action → EmptyStatusIndexedActionClickCallback?
-
点击事件回调
final
- bgColor → Color
-
背景色设置
默认Colors.white
final
- content → String?
-
内容
final
- enablePageTap → bool
-
是否可点击页面回调配合action使用
当为true时调用action回调,当为false时不做处理
默认false
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- img → Image?
-
图片
final
- isCenterVertical → bool
-
内容垂直居中
默认 false
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- operateAreaType → OperateAreaType
-
操作区类型
final
-
operateTexts
→ List<
String> ? -
操作区文案
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- themeData ↔ AbnormalStateConfig?
-
getter/setter pair
- title → String?
-
标题
final
- topOffset → double?
-
顶部距离走自动计算逻辑:父视图高度的8%,可自己指定高度
默认为null
final
- topPercent → double
-
距顶部高度百分比
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