BasePageViewState<VM extends BaseMultiVM, T extends BasePageViewPage> class abstract

Inheritance

Constructors

BasePageViewState.new()

Properties

context BuildContext
The location in the tree where this widget builds.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
mounted bool
Whether this State object is currently in a tree.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaffoldKey GlobalKey<ScaffoldState>
no setterinherited
viewModel → VM
no setterinherited
wantKeepAlive bool
通过wantKeepAlive来判断当前tab是否需要keep alive
no setteroverride
widget → T
The current configuration.
no setterinherited

Methods

activate() → void
Called when this object is reinserted into the tree after having been removed via deactivate.
inherited
build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
inherited
createAppBar(BuildContext context, VM viewModel) Widget
创建AppBar控件,子类可override自定义
inherited
createContentWidget(BuildContext context, VM viewModel) Widget
创建内容控件,交由子类自行实现
inherited
createDrawer() Widget?
创建左边的侧拉栏视图
inherited
createDrawerDragStartBehavior() DragStartBehavior
侧拉栏拉出的开始为止
inherited
createDrawerEdgeDragWidth() double?
距离两边多少距离可以拉出侧拉栏
inherited
createDrawerEnableOpenDragGesture() bool
设置左边的侧拉栏是否支持手势拉出
inherited
createEmptyView(BuildContext context, VM viewModel, ViewStateController controller) Widget
创建空视图,子类可override自定义
inherited
createEndDraw() Widget?
创建右边的侧拉栏视图
inherited
createEndDrawerEnableOpenDragGesture() bool
设置右边的侧拉栏是否支持手势拉出
inherited
createErrorView(BuildContext context, VM viewModel, ViewStateController controller) Widget
创建错误视图,子类可override自定义
inherited
createLoadingDialog(String? loadingTxt) Dialog
如果不喜欢这个加载弹框样式,可以重写
inherited
createLoadingView(BuildContext context, VM viewModel, ViewStateController controller) Widget
创建Loading视图,子类可override自定义
inherited
createMultiContentWidget(BuildContext context, VM viewModel) Widget
创建内容控件,抽象方法,子类必须实现
inherited
createOnDrawerChanged() DrawerCallback?
设置右边侧拉栏的变化回调
inherited
createOnEndDrawerChanged() DrawerCallback?
设置左边侧拉栏的变化回调
inherited
createViewModel() → VM
创建ViewModel
inherited
deactivate() → void
Called when this object is removed from the tree.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
didChangeDependencies() → void
Called when a dependency of this State object changes.
inherited
didUpdateWidget(covariant T oldWidget) → void
Called whenever the widget configuration changes.
override
dismissLoading() → void
隐藏loading弹框
inherited
dispose() → void
组件被销毁
inherited
finish({T? result, bool cantPopExit = true}) → void
cantPopExit 如果不可pop的时候是否退出当前APP,默认是true
inherited
getString(MultiString multiString) String
inherited
hideKeyboard() → void
inherited
initState() → void
Called when this object is inserted into the tree.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCreate() → void
override
onDestroy() → void
override
onEmptyViewTap() GestureTapCallback?
inherited
onErrorViewTap() GestureTapCallback?
inherited
onPause() → void
inherited
onResume() → void
inherited
onScreenSizeChanged() → void
inherited
reassemble() → void
Called whenever the application is reassembled during debugging, for example during hot reload.
inherited
setState(VoidCallback fn) → void
Notify the framework that the internal state of this object has changed.
inherited
showKeyboard(FocusNode focusNode) → void
inherited
showLoading({String? loadingTxt, Color? barrierColor, bool barrierDismissible = false, bool cancelable = false}) → void
展示loading弹框
inherited
showToast(String? msg) → void
展示toast
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
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited
updateKeepAlive() → void
Ensures that any AutomaticKeepAlive ancestors are in a good state, by firing a KeepAliveNotification or triggering the KeepAliveHandle as appropriate.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited