Commit Graph

5 Commits

Author SHA1 Message Date
hunteraraujo
bf60feaa7e Refactor TaskView to Include API Base URL Field
- Added ApiBaseUrlField widget to the TaskView.
- Included a TextEditingController to manage the API base URL value.
- Initialized the text field with the current base URL value from ApiSettingsViewModel.
- Modified the layout to place the API base URL field and associated buttons below the task list.

The commit introduces a user interface enhancement that allows the user to update the API base URL directly from the TaskView. This ensures better configurability and user experience.
2023-09-02 20:34:40 -07:00
hunteraraujo
eaa4825e6b Refactor ApiBaseUrlField into a Separate Widget
- Extracted the API Base URL field and associated buttons into a new ApiBaseUrlField widget.
- Utilized Consumer to listen for changes in ApiSettingsViewModel.
- Maintained the look and feel consistent with the application's existing UI elements.

This refactor enhances code modularity and readability by isolating the API settings UI in its own widget.
2023-09-02 20:22:43 -07:00
hunteraraujo
ff7667108f Implement User Interactions in TaskView
This commit adds functionality to handle user interactions in the TaskView class by implementing the onPressed, onTap, and onDelete methods:

- onPressed: Triggered when the "New Task" button is pressed. It clears the current task ID and chat history in the ChatViewModel.
- onTap: Triggered when a task list tile is tapped. It selects the task in TaskViewModel and updates the current task ID in ChatViewModel.
- onDelete: Triggered when the delete button on a task list tile is pressed. It deletes the task from TaskViewModel and clears the current task ID and chat history in ChatViewModel if the deleted task was the current task.

These implementations provide a seamless user experience for managing tasks and associated chats.
2023-08-31 15:50:10 -07:00
hunteraraujo
803e3f6ef9 Fix various splash radius for icon buttons 2023-08-25 08:12:35 -07:00
hunteraraujo
d7b6d1e49a Implement and Test Chat Input Field Widget
This commit introduces the ChatInputField widget, a custom text input field designed for use within the ChatView. The ChatInputField widget handles varying screen sizes and gracefully resizes itself according to the available width. It starts with a height of 50 and can expand up to 400 as the user types more lines of text.

In addition to the implementation, this commit also includes widget tests to ensure the ChatInputField behaves as expected.

- Add ChatInputField widget with dynamic resizing
- Include IconButton for sending messages
- Add widget tests for ChatInputField
- Handle edge cases and overflows
2023-08-24 11:55:05 -07:00