checkVersion method
- T data
Checks this message's version and checks for support.
Implementation
bool checkVersion(T data) {
if (!models.settings.dashboard.versionChecking) return true;
if (data is RoverPosition) return true;
final newVersion = parseVersion(data);
if (newVersion.hasMajor()) version = newVersion;
if (!matchesVersion && newVersion.hasMajor()) {
models.home.setMessage(severity: Severity.critical, text: "Received $name v${version.format()}, expected ^${supportedVersion.format()}", permanent: true);
}
return matchesVersion;
}