metadata method

  1. @override
FlagMetadata metadata()
override

Implementation

@override
FlagMetadata metadata() {
  // Before expose whe should check the Type
  Modification? modif = this._visitorDelegate.getFlagModification(this._key);
  if (modif != null &&
      (modif.value == null || _isSameTypeOrDefaultValueNull(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);
  }
}