updateVersionOnFile method

Future<void> updateVersionOnFile(
  1. String newVersion, {
  2. File? file,
  3. String template = '',
})

Implementation

Future<void> updateVersionOnFile(
  String newVersion, {
  File? file,
  String template = '',
}) async {
  final theFile = file ?? await _getPubspecFile();
  if (theFile.basename == pubspecFile) {
    await _updateVersionOnPubspecFile(theFile, newVersion);
  } else {
    await _updateVersionOnFileWithTemplate(theFile, template, newVersion);
  }
}