metadata method

FlagMetadata metadata()

Implementation

FlagMetadata metadata() {
  // Before expose whe should check the Type
  Modification? modif = this._visitorDelegate.getFlagModification(this._key);
  if (modif != null && (modif.value == null || _isSameType(modif.value))) {
    // when the flag value is null we provide the metadata
    return FlagMetadata.withMap(this._visitorDelegate.getModificationInfo(this._key));
  } else {
    return FlagMetadata.withMap(null);
  }
}