addDynamicElement method Null safety

void addDynamicElement(
  1. dynamic element
)

Implementation

void addDynamicElement(dynamic element) {
  dynamicElements ??= [];
  dynamicElements!.add(element);
}