renderVersionConstant function

String renderVersionConstant(
  1. String version, {
  2. String constant = 'packageVersion',
})

Renders the generated version.g.dart contents for version.

Implementation

String renderVersionConstant(
  String version, {
  String constant = 'packageVersion',
}) {
  return '// Generated from pubspec.yaml by the release tool. '
      'Do not edit by hand.\n'
      "const String $constant = '$version';\n";
}