ultimate_alarm_clock
ultimate_alarm_clock copied to clipboard
Refactor: Added a generic "Action Button" to replace all the duplicate buttons throughout the application
Description
This PR adds a generic ActionButton to replace all the duplicate buttons with same logic throughout the application, along with this the PR also refactors the Save or Update button in AddOrUpdateAlarmView widget by creating a separate widget for the button in a different file, while also differentiating the business logic from UI to improve code readability, maintainability, and separation of concerns.
Proposed Changes
- Created a new folder utils/widgets which will contain all the universal UI components to be created as a part of refactoring the application
- Created a new ActionButton Widget
- Created a separate widget file for the SaveUpdateButton, moving it out of AddOrUpdateAlarmView to enhance modularity.
- Separated UI and business logic by keeping the button's responsibility limited to rendering, while delegating logic to controller functions.
Fixes #654
Screenshots
Checklist
- [x] Tests have been added or updated to cover the changes
- [x] Documentation has been updated to reflect the changes
- [x] Code follows the established coding style guidelines
- [x] All tests are passing
@MarkisDev Please Review the PR
Also, sorry about the delay. Since this is a big change for the application, wanted to make sure I go through it properly,