major property

int get major

Implementation

int get major => Semver.tryParse(semver)?.major ?? 0;