mirror of
https://github.com/foss42/apidash.git
synced 2025-12-05 04:18:56 +08:00
feat: enhance authentication fields with additional info
This commit is contained in:
@@ -75,7 +75,8 @@ class _ApiKeyAuthFieldsState extends State<ApiKeyAuthFields> {
|
||||
AuthTextField(
|
||||
readOnly: widget.readOnly,
|
||||
controller: _keyController,
|
||||
hintText: "API Key",
|
||||
title: "API Key",
|
||||
hintText: "Key",
|
||||
isObscureText: true,
|
||||
onChanged: (value) => _updateApiKeyAuth(),
|
||||
),
|
||||
@@ -84,22 +85,21 @@ class _ApiKeyAuthFieldsState extends State<ApiKeyAuthFields> {
|
||||
}
|
||||
|
||||
void _updateApiKeyAuth() {
|
||||
widget.updateAuth(
|
||||
widget.authData?.copyWith(
|
||||
type: APIAuthType.apiKey,
|
||||
apikey: AuthApiKeyModel(
|
||||
key: _keyController.text.trim(),
|
||||
name: _nameController.text.trim(),
|
||||
location: _addKeyTo,
|
||||
),
|
||||
) ?? AuthModel(
|
||||
widget.updateAuth(widget.authData?.copyWith(
|
||||
type: APIAuthType.apiKey,
|
||||
apikey: AuthApiKeyModel(
|
||||
key: _keyController.text.trim(),
|
||||
name: _nameController.text.trim(),
|
||||
location: _addKeyTo,
|
||||
),
|
||||
)
|
||||
);
|
||||
) ??
|
||||
AuthModel(
|
||||
type: APIAuthType.apiKey,
|
||||
apikey: AuthApiKeyModel(
|
||||
key: _keyController.text.trim(),
|
||||
name: _nameController.text.trim(),
|
||||
location: _addKeyTo,
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user