postBuild method

  1. @protected
Widget postBuild(
  1. BuildContext context,
  2. Widget widget,
  3. WidgetNodeSpec spec
)

Handles generic convenience properties from a spec, like decoration, margin or visibility.

Implementation

@protected
Widget postBuild(BuildContext context, Widget widget, WidgetNodeSpec spec) {
  widget = handleHero(context, widget, spec);
  widget = handleDecorator(context, widget, spec);
  widget = handleMargin(context, widget, spec);
  if (EditorBloc.editMode &&
      widget is! PreferredSizeWidget &&
      widget is! Expanded) {
    widget = EditWidget(spec.id, widget);
  }
  widget = handleExpanded(context, widget, spec);
  widget = handleSafeArea(context, widget, spec);
  widget = handleVisibility(context, widget, spec);
  return widget;
}