build method
Should not be overridden by application code
Implementation
@override
@nonVirtual
Widget build(BuildContext context) {
Widget widget = Obx(() {
// this is needed in case there are no observables in the widgets
// themselves (because in such scenario GetX.Obx crashes)
_dummy++;
if (!this.$isReady()) {
// not ready yet. try to get an Initial Widget
Widget? widget = this.hookBuildInitialWidget();
if (widget != null) {
// found one. return it without invoking the "regular" build.
return widget;
}
// no Initial Widget, but there may still be an _INITIAL_ZML
// constant; if there is one - it will be handled by
// this.$internalBuild() (and if there isn't - then $internalBuild
// will make a Widget from the primary ZML as it does when we're
// in _EzLifecycleState.ready.
}
return this.$internalBuild(context);
});
return widget;
}