projectSelectionLabel static method

String projectSelectionLabel(
  1. ProjectInfo project, {
  2. required bool inUtc,
})

The label of project in the project selection list, stating when it was last deployed in either the local or the UTC time zone.

Implementation

static String projectSelectionLabel(
  final ProjectInfo project, {
  required final bool inUtc,
}) {
  final lastDeployedTime = project.latestDeployAttemptTime?.timestamp;
  final lastDeployed = lastDeployedTime == null
      ? 'available for first deployment'
      : 'available for redeploy, last deployed '
            '${lastDeployedTime.toLabeledTzString(inUtc, numTimeStampMinuteChars)}';
  return '${project.project.cloudProjectId.padRight(30)}$lastDeployed';
}