checkServerProtocolVersion method

bool checkServerProtocolVersion(
  1. Version version
)

Return true if the server's protocol is compatible.

Implementation

bool checkServerProtocolVersion(Version version) {
  final minVersion = Version.parse(PROTOCOL_VERSION);
  final maxVersion = minVersion.nextBreaking;
  return minVersion <= version && version < maxVersion;
}