Habib Al-Shaikh - Selection-Project#10
Habib Al-Shaikh - Selection-Project#10HabibAlShaikh wants to merge 7 commits intoGDSC-IAU:masterfrom
Conversation
…ntMenu, handleChoice, addNote, viewNotes, searchNote
RyamAlmalki
left a comment
There was a problem hiding this comment.
I was happy when you added the check to see if the title name was already taken! I love that you thought about it and also created a cute interface. I had a fun time using it. So proud of you!! Can't wait to see more of your beautiful work.
| return; | ||
| } | ||
| } | ||
| class NoteList{ |
There was a problem hiding this comment.
Consider separating classes into different files for improved readability.
| notes.deleteNoteByTitle(foundNote.title); | ||
| print(greenColor + "Note with Title \"${foundNote.title}\" found deleted successfully." + resetColor); | ||
| } else { | ||
| print(redColor + "Note not found." + resetColor); |
There was a problem hiding this comment.
Instead of using global variables for colors, consider using a helper function to apply colors when printing messages. This can make your code more modular and easier to maintain.
String applyColor(String message, String color) {
return '$color$message$resetColor';
}
// Usage
print(applyColor("Invalid choice.", redColor));| int searchBy = int.parse(input!); | ||
| switch(searchBy){ | ||
| case 1: | ||
| print("enter ID: "); |
There was a problem hiding this comment.
There is some duplication in the code, particularly in the editNote, deleteNote, and searchNote functions. Consider refactoring the common parts into separate functions to avoid redundancy, such as searching for a note by ID.
No description provided.