refusalMessage static method

String? refusalMessage({
  1. required bool hasTerminal,
  2. required bool acceptFlag,
})

Mirrors LoginCommand.ciRefusalMessage: null when it's fine to proceed (a real terminal to prompt on, or the flag already given), else the refusal naming --accept-terms. Must be consulted — and obeyed — before any network call or account creation, so a refused run leaves no orphaned Firebase Auth user.

Implementation

static String? refusalMessage({
  required bool hasTerminal,
  required bool acceptFlag,
}) {
  if (acceptFlag || hasTerminal) return null;
  return 'No terminal to prompt for terms acceptance — refusing to sign '
      'up.\n'
      '  Pass `--accept-terms` to confirm you accept the Terms & '
      'Conditions and Privacy Policy.';
}