From 2dcc2be8d1c60ce83e50e1908124a69d655cb59a Mon Sep 17 00:00:00 2001 From: Karol Date: Wed, 15 Jan 2025 08:38:32 +0100 Subject: [PATCH] updated initial messsage --- app/lib/pages/chat_page.dart | 7 ++++--- app/lib/widgets/button_row.dart | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/lib/pages/chat_page.dart b/app/lib/pages/chat_page.dart index d791307..d5107fb 100644 --- a/app/lib/pages/chat_page.dart +++ b/app/lib/pages/chat_page.dart @@ -48,6 +48,8 @@ class _ChatBodyState extends State { // Automatically scroll to the bottom after a new message is added _scrollToBottom(); + + // Clear the input text field after sending the message _controller.clear(); } @@ -77,12 +79,11 @@ class _ChatBodyState extends State { 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( diff --git a/app/lib/widgets/button_row.dart b/app/lib/widgets/button_row.dart index 8d2c9cb..0c72b4c 100644 --- a/app/lib/widgets/button_row.dart +++ b/app/lib/widgets/button_row.dart @@ -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"),