Skip to content

ApiKeyPromptPanel ​

Category: UI

Source: api_key_prompt_panel.dart

Single-input modal for providers that need an API key.

Built on [PanelOverlay]. Masks input as •; pre-fills with "[using $ENV — leave blank to keep]" when the provider's env var is already set.

Classes ​

ApiKeyPromptPanel ​

Constructor ​

dart
ApiKeyPromptPanel({
    required this.providerId,
    required this.providerName,
    this.envVar,
    this.envPresent,
    this.helpUrl,
    PanelSize? width,
    PanelSize? height,
  })

Properties ​

PropertyTypeDescription
providerIdString
providerNameString
envVarString?
envPresentString?
helpUrlString?
hasEnvPresentbool get
resultFuture<String?> getResolves with: - null on Esc cancel. - '' (empty) when submit is pressed with no input AND env is present (user accepts env-only). - the typed string otherwise.
isCompletebool get
hasEnvPresentbool get
resultFuture<String?> getResolves with: - null on Esc cancel. - '' (empty) when submit is pressed with no input AND env is present (user accepts env-only). - the typed string otherwise.
isCompletebool get

Methods ​

void cancel() ​
bool handleEvent(TerminalEvent event) ​
`List<String> render( ​
int termWidth,
int termHeight,
List&lt;String&gt; backgroundLines,

)`

Released under the MIT License.