FimBaseWidgetState<T extends FimBaseWidget> class

Inheritance
Mixed in types

Constructors

FimBaseWidgetState()

Properties

context BuildContext
The location in the tree where this widget builds. [...]
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
mounted bool
Whether this State object is currently in a tree. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
widget → T
The current configuration. [...]
read-only, inherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget. [...]
override
buildWidget(BuildContext context) Widget
返回UI控件 相当于setContentView()
inherited
clickAppBarBack() → void
inherited
deactivate() → void
在dispose之前,会调用这个函数。 实测在组件可见状态变化的时候会调用,当组件卸载时也会先一步dispose调用。
override
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
didChangeAccessibilityFeatures() → void
Called when the system changes the set of currently active accessibility features. [...]
inherited
didChangeAppLifecycleState(AppLifecycleState state) → void
Called when the system puts the app in the background or returns the app to the foreground. [...]
override
didChangeDependencies() → void
这个函数会紧跟在initState之后调用
override
didChangeLocales(List<Locale> locales) → void
Called when the system tells the app that the user's locale has changed. For example, if the user changes the system language settings. [...]
inherited
didChangeMetrics() → void
Called when the application's dimensions change. For example, when a phone is rotated. [...]
inherited
didChangePlatformBrightness() → void
Called when the platform brightness changes. [...]
inherited
didChangeTextScaleFactor() → void
Called when the platform's text scale factor changes. [...]
inherited
didHaveMemoryPressure() → void
Called when the system is running low on memory. [...]
inherited
didPopRoute() Future<bool>
Called when the system tells the app to pop the current route. For example, on Android, this is called when the user presses the back button. [...]
inherited
didPushRoute(String route) Future<bool>
Called when the host tells the application to push a new route onto the navigator. [...]
inherited
didPushRouteInformation(RouteInformation routeInformation) Future<bool>
Called when the host tells the application to push a new RouteInformation and a restoration state onto the router. [...]
inherited
didUpdateWidget(covariant T oldWidget) → void
当组件的状态改变的时候就会调用didUpdateWidget,比如调用了setState. 实际上这里flutter框架会创建一个新的Widget,绑定本State,并在这个函数中传递老的Widget。 这个函数一般用于比较新、老Widget,看看哪些属性改变了,并对State做一些调整。 需要注意的是,涉及到controller的变更,需要在这个函数中移除老的controller的监听,并创建新controller的监听。
override
dispose() → void
一旦到这个阶段,组件就要被销毁了,这个函数一般会移除监听,清理环境。
override
finish<T extends Object>([T result]) → void
inherited
finishDartPageOrApp() → void
关闭最后一个 flutter 页面 , 如果是原生跳过来的则回到原生,否则关闭app
inherited
getAppBar(BuildContext context) Widget
inherited
getAppBarCenter(BuildContext context) Widget
导航栏appBar中间部分 ,不满足可以自行重写
inherited
getAppBarHeight() double
返回appbar高度,也就是导航栏高度
inherited
getAppBarLeft(BuildContext context) Widget
导航栏appBar左边部分 ,不满足可以自行重写
inherited
getAppBarRight(BuildContext context) Widget
导航栏appBar右侧部分 ,不满足可以自行重写
inherited
getBaseView(BuildContext context) Widget
inherited
getClassName() String
inherited
getErrorWidget(BuildContext context) Widget
inherited
getLoadingWidget(BuildContext context) Widget
inherited
getNoDataWidget(BuildContext context) Widget
inherited
getScreenHeight() double
返回屏幕高度
inherited
getScreenWidth() double
返回屏幕宽度
inherited
getTopBar(BuildContext context) Widget
subclass can overwrite
inherited
getTopBarHeight() double
inherited
getWidgetName() String
inherited
initBaseCommon(State<StatefulWidget> state) → void
inherited
initState() → void
当插入渲染树的时候调用,这个函数在生命周期中只调用一次。 这里可以做一些初始化工作,比如初始化State的变量。
override
log(String content) → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
onBackground() → void
app切回到后台
inherited
onClickErrorWidget() → void
inherited
onDestory() → void
页面注销方法
inherited
onFetchData() → void
只要页面来到栈顶, 都会调用此方法,网络请求可以放在这个方法
inherited
onForeground() → void
app切回到前台
inherited
onInitDatas() → void
初始化一些变量
inherited
reassemble() → void
Called whenever the application is reassembled during debugging, for example during hot reload. [...]
@mustCallSuper, @protected, inherited
setAppBarBackColor(Color color) → void
默认这个导航栏下,设置颜色
inherited
setAppBarContentColor(Color contentColor) → void
设置导航栏的字体以及图标颜色
inherited
setAppBarTitle(String title) → void
inherited
setAppBarVisible(bool isVisible) → void
设置导航栏隐藏或者显示
inherited
setBackIconHiden({bool isHiden = true}) → void
inherited
setPageStatus(PageStatus status) → void
设置页面状态
inherited
setState(VoidCallback fn) → void
Notify the framework that the internal state of this object has changed. [...]
@protected, inherited
setTipTitle(String title) → void
设置tipTitle
inherited
setTopBarBackColor(Color color) → void
默认这个状态栏下,设置颜色
inherited
setTopBarVisible(bool isVisible) → void
设置状态栏隐藏或者显示
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

Operators

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