replaceChildrenOfElement function Null safety

Element replaceChildrenOfElement(
  1. Element el,
  2. Map<String, RegularElement> definedOverrides,
  3. void onError(
    1. JaelError e
    )?,
  4. bool replaceWithDefault,
  5. bool anyTemplatesRemain
)

Implementation

Element replaceChildrenOfElement(
    Element el,
    Map<String, RegularElement> definedOverrides,
    void Function(JaelError e)? onError,
    bool replaceWithDefault,
    bool anyTemplatesRemain) {
  if (el is RegularElement) {
    return replaceChildrenOfRegularElement(
        el, definedOverrides, onError, replaceWithDefault, anyTemplatesRemain);
  } else {
    return el;
  }
}