feat: enhance authentication fields with additional info

This commit is contained in:
Udhay-Adithya
2025-07-07 22:25:54 +05:30
parent 739afca856
commit e838654b2d
4 changed files with 59 additions and 29 deletions

View File

@@ -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,
),
));
}
}