VersionManager class
Service managing reading, calculating, and updating Flutter project versions.
Constructors
- VersionManager({PubspecVersionHandler pubspecHandler = const PubspecVersionHandler(), BuildNumberStrategy buildNumberStrategy = const BuildNumberStrategy()})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
calculateNextVersion(
{required String projectPath, required VersionBumpMode mode, ReleaseType releaseType = ReleaseType.normal, String? explicitVersionName, int? explicitBuildNumber}) → Future< ProjectVersion> -
Calculates next version based on
mode,releaseType, and optional explicit inputs. -
getCurrentVersion(
String projectPath) → ProjectVersion -
Reads current version from
pubspec.yamlinsideprojectPath. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readVersion(
String projectPath) → ProjectVersion - Alias for getCurrentVersion.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateVersion(
String projectPath, ProjectVersion newVersion, {bool dryRun = false, TerminalOutput? output}) → void -
Writes
newVersionintopubspec.yamlinsideprojectPathunlessdryRunis true.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited