Skip to content

Commit

Permalink
updated initial messsage
Browse files Browse the repository at this point in the history
  • Loading branch information
Karol committed Jan 15, 2025
1 parent 3c929dd commit 2dcc2be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions app/lib/pages/chat_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class _ChatBodyState extends State<ChatBody> {

// Automatically scroll to the bottom after a new message is added
_scrollToBottom();

// Clear the input text field after sending the message
_controller.clear();
}

Expand Down Expand Up @@ -77,12 +79,11 @@ class _ChatBodyState extends State<ChatBody> {
padding: const EdgeInsets.all(16.0),
child: Text(
apiProvider.initialMessage,
style: const TextStyle(fontSize: 16, color: Colors.white), // White text, no background
style: const TextStyle(fontSize: 16, color: Colors.white),
),
),
// Centering the ButtonRow widget
Center(
child: ButtonRow(onButtonPressed: _handleButtonPress), // Add the button row
child: ButtonRow(onButtonPressed: _handleButtonPress),
),
Expanded(
child: Scrollbar(
Expand Down
2 changes: 1 addition & 1 deletion app/lib/widgets/button_row.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ButtonRow extends StatelessWidget {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 10.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, // This will center the buttons
children: [
ElevatedButton(
onPressed: () => onButtonPressed("Driving License"),
Expand Down

0 comments on commit 2dcc2be

Please sign in to comment.