added x button to coversation bot settings and make text fields expand to fit contents
This commit is contained in:
parent
e1062b3443
commit
b3a0ad1b6e
2 changed files with 25 additions and 9 deletions
|
|
@ -35,6 +35,9 @@ class ConversationBotModeDynamicZone extends StatelessWidget {
|
|||
? L10n.of(context)!.enterDiscussionTopic
|
||||
: null,
|
||||
enabled: enabled,
|
||||
minLines: 1, // Minimum number of lines
|
||||
maxLines: null, // Allow the field to expand based on content
|
||||
keyboardType: TextInputType.multiline,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
TextFormField(
|
||||
|
|
@ -44,6 +47,9 @@ class ConversationBotModeDynamicZone extends StatelessWidget {
|
|||
),
|
||||
controller: discussionKeywordsController,
|
||||
enabled: enabled,
|
||||
minLines: 1, // Minimum number of lines
|
||||
maxLines: null, // Allow the field to expand based on content
|
||||
keyboardType: TextInputType.multiline,
|
||||
),
|
||||
];
|
||||
|
||||
|
|
@ -60,6 +66,9 @@ class ConversationBotModeDynamicZone extends StatelessWidget {
|
|||
: null,
|
||||
controller: customSystemPromptController,
|
||||
enabled: enabled,
|
||||
minLines: 1, // Minimum number of lines
|
||||
maxLines: null, // Allow the field to expand based on content
|
||||
keyboardType: TextInputType.multiline,
|
||||
),
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -169,17 +169,24 @@ class ConversationBotSettingsDialogState
|
|||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 12,
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 12,
|
||||
),
|
||||
child: Text(
|
||||
L10n.of(context)!.botConfig,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
L10n.of(context)!.botConfig,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
IconButton(
|
||||
icon: const Icon(Icons.close),
|
||||
onPressed: () => Navigator.of(context).pop(null),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SwitchListTile(
|
||||
title: Text(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue