# Version.parse constructor

Version.parse(

1. String version

)

Parses a version string (e.g., '3.1.4') into a Version instance.

Missing minor or patch components default to 0.

### Example:

    final version = Version.parse('3.2'); // Version(3, 2, 0)

## Implementation

    factory Version.parse(String version) {
      final parts = version.split('.');
      return Version(
        int.parse(parts[0]),
        parts.length > 1 ? int.parse(parts[1]) : 0,
        parts.length > 2 ? int.parse(parts[2]) : 0,
      );
    }