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
| Property | Type | Description |
|---|---|---|
providerId | String | |
providerName | String | |
envVar | String? | |
envPresent | String? | |
helpUrl | String? | |
hasEnvPresent | bool get | |
result | Future<String?> get | Resolves 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. |
isComplete | bool get | |
hasEnvPresent | bool get | |
result | Future<String?> get | Resolves 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. |
isComplete | bool get |
Methods
void cancel()
bool handleEvent(TerminalEvent event)
`List<String> render(
int termWidth,
int termHeight,
List<String> backgroundLines,
)`