isCompatibleWith method

bool isCompatibleWith (SemanticsConfiguration other)

Whether this configuration is compatible with the provided other configuration.

Two configurations are said to be compatible if they can be added to the same SemanticsNode without losing any semantics information.

Implementation

bool isCompatibleWith(SemanticsConfiguration other) {
  if (other == null || !other.hasBeenAnnotated || !hasBeenAnnotated)
    return true;
  if (_actionsAsBits & other._actionsAsBits != 0)
    return false;
  if ((_flags & other._flags) != 0)
    return false;
  if (_platformViewId != null && other._platformViewId != null) {
    return false;
  }
  if (_value != null && _value.isNotEmpty && other._value != null && other._value.isNotEmpty)
    return false;
  return true;
}