add method Null safety

void add(
  1. Extension extension
)

Stores an extension in the registry.

Implementation

void add(Extension extension) {
  var map =
      _extensions.putIfAbsent(extension.extendee, () => <int, Extension>{});
  map[extension.tagNumber] = extension;
}