welcomeBanner function

String welcomeBanner({
  1. required bool color,
})

The full launch screen shown for a bare flutterstart invocation.

Implementation

String welcomeBanner({required bool color}) {
  const fw = 76; // camera-focus frame span; the wordmark fits inside
  final b = StringBuffer()
    ..writeln()
    ..writeln(_cornerLine('┏', '┓', color: color, fw: fw))
    ..writeln(_sideLine(color: color, fw: fw))
    ..writeln('   ${_c(_dim, 'Welcome to', color: color)}');
  for (final line in _flutterArt.split('\n')) {
    b.writeln('   ${_c(_blue, line, color: color)}');
  }
  for (final line in _startArt.split('\n')) {
    b.writeln('         ${_c(_orange, line, color: color)}');
  }
  b
    ..writeln(
      '   ${_c(_boldBlue, 'Plan it.', color: color)} Review it. ${_c(_boldOrange, 'Start safely.', color: color)}',
    )
    ..writeln(
      '   ${_c(_dim, 'Command-line interface · deterministic, review-first Flutter projects', color: color)}',
    )
    ..writeln()
    ..writeln(
      '   FlutterStart stages, plans, and applies every change so you review it',
    )
    ..writeln('   before it touches disk — nothing is generated by surprise.')
    ..writeln()
    ..writeln(
      '   ${_c(_blue, '●', color: color)} ${_c(_dim, 'Version        ', color: color)}${_c(_green, 'v$flutterStartProductVersion', color: color)}',
    )
    ..writeln(
      '   ${_c(_blue, '●', color: color)} ${_c(_dim, 'Environment    ', color: color)}run ${_c(_blue, 'flutterstart doctor', color: color)} to verify',
    )
    ..writeln()
    ..writeln(_sideLine(color: color, fw: fw))
    ..writeln(_cornerLine('┗', '┛', color: color, fw: fw))
    ..writeln()
    ..writeln(
      '   ${_c(_dim, 'Try', color: color)} ${_c(_blue, 'flutterstart create my_app', color: color)}   ${_c(_dim, '·', color: color)}   ${_c(_dim, 'Docs', color: color)} ${_c(_dim, _repo, color: color)}',
    );
  return b.toString();
}