replaceChildrenOfRegularElement function Null safety

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

Implementation

RegularElement replaceChildrenOfRegularElement(
    RegularElement el,
    Map<String?, RegularElement> definedOverrides,
    void Function(JaelError e)? onError,
    bool replaceWithDefault,
    bool anyTemplatesRemain) {
  var children = allChildrenOfRegularElement(
      el, definedOverrides, onError, replaceWithDefault, anyTemplatesRemain);
  return RegularElement(el.lt, el.tagName, el.attributes, el.gt, children,
      el.lt2, el.slash, el.tagName2, el.gt2);
}