createdMessage static method

String createdMessage({
  1. required String rawKey,
  2. required String prefix,
})

Pure — the raw-key display plus the revoke hint, so the printed prefix and the printed revoke command can't drift apart without a test catching it. Takes the server's own prefix (already in the create response) rather than re-deriving it from rawKey.

Implementation

static String createdMessage({
  required String rawKey,
  required String prefix,
}) =>
    '\n'
    '  $rawKey\n'
    '\n'
    '  Prefix $prefix — how it appears in `keys list`,\n'
    '  and how to revoke it:\n'
    '    appflight keys revoke $prefix';