build method

  1. @override
Widget build(
  1. BuildContext context
)
override

Calls the required Function object: Function(BuildContext context, T? object) and passes along the app's custom 'object'

Implementation

@override
Widget build(BuildContext context) {
  //
  final rootState = RootState._rootStateX;

  if (rootState != null) {
    /// Go up the widget tree and link to the App's inherited widget.
    rootState.dependOnInheritedWidget(context);
    rootState._inSetStateBuilder = true;
    StateX._setStateAllowed = false;
  }

  final Widget widget = builder(context, rootState?._dataObj);

  if (rootState != null) {
    StateX._setStateAllowed = true;
    rootState._inSetStateBuilder = false;
  }
  return widget;
}