CopilotApiToken class final
A short-lived Copilot API token (lifetime ~30 min).
Constructors
- CopilotApiToken({required String token, required DateTime expiresAt, required int refreshIn})
-
Creates a token.
const
-
CopilotApiToken.fromJson(Map<
String, dynamic> json) -
Builds a token from the exchange payload
{token, expires_at (unix seconds), refresh_in (seconds)}.factory
Properties
- expiresAt → DateTime
-
When the token stops working (UTC).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- refreshIn → int
-
The endpoint's refresh hint in seconds.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- token → String
-
The Bearer credential for Copilot API requests.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited