Create and Edit Screen Implementation - #44
Open
samarthverma0407 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request – Nudj Contribution
Thank you for contributing to Nudj! Please fill out this PR template completely so we can review your work effectively.
🔧 What does this PR do?
🧩 Related Issue
Closes: #40
📸 Screenshots / UI Demo (If applicable)
EditScreen.mp4
CreateEvent.mp4
CreateClub.mp4
✅ Checklist
main🧠 Brief Explanation of Approach
I created reusable layouts for club and general event forms, which are shared by both the Create and Edit screens to avoid code duplication. I also created reusable UI components, such as the dynamic text field list and image picker, so they can be reused wherever required within the layouts. For switching between the club and event forms in the Create screen, I used a FormType enum to determine which layout to display. For image selection, instead of maintaining separate activity result launchers for each image field, I reused a single launcher and used an ImagePickerType enum to identify the target image, keeping the image picker logic centralized and reducing repetitive code. Form state is managed using the MVVM architecture with ViewModel and StateFlow, ensuring a clear separation between the UI and business logic.
📢 Additional Notes (Optional)