build method

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

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

Implementation

@override
Widget build(BuildContext context) {
  /// Go up the widget tree and link to the App's inherited widget.
  context.dependOnInheritedWidgetOfExactType<_AppInheritedWidget>();

  final rootState = _RootStateMixin._rootStateMVC;

  if (rootState != null) {
    rootState._inSetStateBuilder = true;
    StateMVC._rebuildAllowed = false;
  }

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

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