FileService class

Constructors

FileService.new()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getAndroidVersion() Map<String, String?>?
Reads and returns the version from the Android build.gradle file. @returns {Map<String, String?>?} A map with 'versionName' and 'buildNumber', or null if the file is not found/readable, or an empty map if parsing fails.
getIosVersion() Map<String, String?>?
Reads and returns the version from the iOS Info.plist file. @returns {Map<String, String?>?} A map with 'versionName' and 'buildNumber', or null if the file is not found/readable, or an empty map if parsing fails.
getPubspecContent() PubspecContentModel?
Reads and returns the content of the pubspec.yaml file. @returns {PubspecContentModel?} The file content, or null if not found.
getPubspecContentAsync() Future<PubspecContentModel?>
Reads and returns the content of the pubspec.yaml file. @returns {PubspecContentModel?} The file content, or null if not found.
getSelfVersion() Future<Map<String, String?>?>
Gets the version of the verman package itself by finding and reading its own pubspec.yaml. This is useful for the verman version command. @returns {Map<String, String?>?} A map with 'versionName' and 'buildNumber', or null if not found.
initializeIosVersion() bool
Initializes the info.plist file. with the necessary key and value for versionName and buildNumber. @returns {bool} True is the file was initialized, false otherwise.
updateAndroidVersion(String versionName, String buildNumber) bool
Updates the version in the Android build.gradle file. @returns {bool} True if the file was updated, false otherwise.
updateIosVersion(String versionName, String buildNumber) bool
Updates the version in the iOS Info.plist file. @returns {bool} True if the file was updated, false otherwise.
writePubspecContent(String newContent, dynamic newVersionName, dynamic newBuildNumber) → void
Write a new content to the pubspec.yaml file