Skip to content

DeviceCodePanel

Category: UI

Source: device_code_panel.dart

Modal for OAuth device-code flows (GitHub Copilot).

Shows the verification URI and a short user code, subscribes to the adapter's progress stream, and completes when the adapter emits [AuthFlowSucceeded] or [AuthFlowFailed] (or the user presses Esc).

Classes

DeviceCodePanel

Constructor

dart
DeviceCodePanel({
    required this.flow,
    this.onNeedsRender,
    PanelSize? width,
    PanelSize? height,
  })

Properties

PropertyTypeDescription
flowDeviceCodeFlow
resultFuture<Map<String, String>?> getResolves with the adapter-returned fields on success, or null on cancel / failure.
isCompletebool get
borderedfinal
innerWfinal
paintedfinal
topPadfinal
leftPadfinal
outfinal
outreturn
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.