BaseMultiPageState<VM extends BaseMultiVM, T extends BaseMultiPage> class abstract

Inheritance
Implementers

Constructors

BaseMultiPageState.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 setter
viewModel → VM
no setterinherited
wantKeepAlive bool
page是否在dispose前保持存活,默认是false 如果你是用类似Android的ViewPager需要ViewPager中某个page因为切换不被销毁即设置成true
no setterinherited
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自定义
createContentWidget(BuildContext context, VM viewModel) Widget
创建内容控件,交由子类自行实现
override
createDrawer() Widget?
创建左边的侧拉栏视图
createDrawerDragStartBehavior() DragStartBehavior
侧拉栏拉出的开始为止
createDrawerEdgeDragWidth() double?
距离两边多少距离可以拉出侧拉栏
createDrawerEnableOpenDragGesture() bool
设置左边的侧拉栏是否支持手势拉出
createEmptyView(BuildContext context, VM viewModel, ViewStateController controller) Widget
创建空视图,子类可override自定义
createEndDraw() Widget?
创建右边的侧拉栏视图
createEndDrawerEnableOpenDragGesture() bool
设置右边的侧拉栏是否支持手势拉出
createErrorView(BuildContext context, VM viewModel, ViewStateController controller) Widget
创建错误视图,子类可override自定义
createLoadingDialog(String? loadingTxt) Dialog
如果不喜欢这个加载弹框样式,可以重写
inherited
createLoadingView(BuildContext context, VM viewModel, ViewStateController controller) Widget
创建Loading视图,子类可override自定义
createMultiContentWidget(BuildContext context, VM viewModel) Widget
创建内容控件,抽象方法,子类必须实现
createOnDrawerChanged() DrawerCallback?
设置右边侧拉栏的变化回调
createOnEndDrawerChanged() DrawerCallback?
设置左边侧拉栏的变化回调
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.
inherited
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
inherited
onDestroy() → void
inherited
onEmptyViewTap() GestureTapCallback?
onErrorViewTap() GestureTapCallback?
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