handleVisibility method

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

Handles convenience 'visible' property.

Implementation

@protected
Widget handleVisibility(
    BuildContext context, Widget widget, WidgetNodeSpec spec) {
  if (!parseBool(spec.props["visible"], defaultValue: true)) {
    widget = Visibility(visible: false, child: widget);
  }
  return widget;
}