BaseMultiPage class abstract
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- BasePage
- BaseMultiPage
- Implementers
Constructors
- BaseMultiPage.new({Key? key, bool lazyCreate = false, bool isCanBackPressed = true, double appbarHeight = 56.0, bool isNeedAppBar = true, bool isNeedScaffold = true, Color bodyColor = ColorConfig.white_f2f2f2, bool extendBodyBehindAppBar = false, bool resizeToAvoidBottomInset = false})
-
具备loading、content、error、empty等多状态视图的页面基础类
lazyCreate
是否等第一帧绘制完成之后在走onCreate生命周期isCanBackPressed
是否支持返回事件appbarHeight
appbar的高度,默认56isNeedAppBar
是否需要appbarisNeedScaffold
是否需要脚手架,如果是false脚手架相关的内容均不可使用(例如appbar, drawer),一般用于viewpage的子页面extendBodyBehindAppBar
如果您希望 body 的高度扩展到包含应用栏的高度并且 body 的顶部与应用栏的顶部对齐,则必须将Scaffold小部件的extendBodyBehindAppBar属性设置为true(默认值为false )。resizeToAvoidBottomInset
在 Flutter 中 Scaffold 默认情况下 resizeToAvoidBottomInset 为 true,当 resizeToAvoidBottomInset 为 true 时,Scaffold 内部会将 mediaQuery.viewInsets.bottom 参与到 BoxConstraints 的大小计算,也就是键盘弹起时调整了内部的 bottom 位置来迎合键盘。这时候键盘已经收起,mediaQuery.viewInsets.bottom 应该更新为 0 ,
Properties
- appbarHeight → double
-
final
- bodyColor → Color
-
final
- extendBodyBehindAppBar → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCanBackPressed → bool
-
finalinherited
- isNeedAppBar → bool
-
final
- isNeedScaffold → bool
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- lazyCreate → bool
-
finalinherited
- lifecycle → PageLifecycle
-
finalinherited
- resizeToAvoidBottomInset → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< BaseMultiPage> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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