Skip to content

David's Solution#1

Open
Orbit90 wants to merge 1 commit intocode-Anambra:mainfrom
Orbit90:main
Open

David's Solution#1
Orbit90 wants to merge 1 commit intocode-Anambra:mainfrom
Orbit90:main

Conversation

@Orbit90
Copy link
Copy Markdown

@Orbit90 Orbit90 commented Mar 3, 2024

IN THIS MODIFIED VERSION OF THE CODE:
1. I added resetInputs() method to clear all the list.
2. I added a new ElevatedButton for resetting the list of Items. This button calls the 'ResetInputs() method when pressed
3. Finally i Modified the addInput() method to trim the input string and check if it's not empty (isNotEmpty)
and if it's not already in the list (!inputs.contains(newInput)). If these conditions are met,
the new message is added to the list. Otherwise, it will just be ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant