remove method

  1. @mustCallSuper
void remove(
  1. JsonWidgetData data
)
inherited

Called when a JSON widget is removed from the tree due to a conditional. Custom widgets may need to implement this to clean up values that may have been placed on the JsonWidgetRegistry by the widget.

If you override this, make sure to end your method with a call to super.remove(data).

Implementation

@mustCallSuper
void remove(JsonWidgetData data) {
  for (var child in data.children ?? <JsonWidgetData>[]) {
    child.builder().remove(child);
  }
}