logSummary method

void logSummary({
  1. required Directory outputDir,
  2. required String message,
})

Implementation

void logSummary({
  required Directory outputDir,
  required String message,
}) {
  final relativePath = path.relative(
    outputDir.path,
    from: Directory.current.path,
  );

  final projectPath = relativePath;
  final projectPathLink =
      link(uri: Uri.parse(projectPath), message: projectPath);

  final readmePath = path.join(relativePath, 'README.md');
  final readmePathLink =
      link(uri: Uri.parse(readmePath), message: readmePath);

  final details = '''
• To get started refer to $readmePathLink
• Your project code is in $projectPathLink
''';

  this
    ..info('\n')
    ..created(message)
    ..info(details)
    ..info(
      lightGray.wrap(infoText),
    );
}