Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancing Code Quality #47 #344

Closed
wants to merge 1 commit into from

Conversation

may-tas
Copy link

@may-tas may-tas commented Oct 8, 2024

#47

-Inconsistent widget structure, incorrect spelling, and performance inefficiencies in the codebase.

Describe Problem / Root Cause

  • The original codebase had several issues that impacted both readability and performance:
  • Misspelled terms like "Progarm" instead of "Program."
  • Inefficient use of stateless and stateful widgets, with missing or incorrect super.key declarations.
  • Repeated code, poor code modularity, and lack of proper utility functions.
  • File naming conventions didn’t follow Flutter’s recommended lower_case_with_underscores.
  • Lack of code optimization, with missing const declarations where necessary.
  • Redundant methods not being referenced and overall poor code organization.

Solution proposed :

Spelling Corrections:

 - All misspelled words were corrected (e.g., "Progarm" to "Program").

Performance Optimizations:

 - Added const where necessary to improve rendering performance.
 - Fixed stateful widget declarations, ensuring correct use of super.key.

Code Refactoring:

 - Refactored the code into smaller, reusable widgets for better readability and maintainability.
 - Moved utility methods into a newly created utils folder to promote reusability across different pages/screens.
 - Removed duplicate code and commented on redundant methods that are no longer in use but were left for potential reference.

File Naming:

  - Renamed all files following Flutter's lower_case_with_underscores naming convention to standardize the project.
  - Specific File Updates:
  - Refactored the following files and corrected the class declarations : outreachy, Season of KDE, ChatbotPage, SplashScreen, RSOCPage, Hyperledger, and FOSSASIA—ensuring code is better organized and files are placed in the correct directories.

Additional Information

  • These changes result in better performance due to the introduction of const widgets, and enhanced code maintainability through improved structure and modularization.
  • Adhering to Flutter’s best practices makes the code easier to scale, debug, and collaborate on in the future.

Copy link

github-actions bot commented Oct 8, 2024

Thank you for submitting your pull request! We'll review it as soon as possible.

@may-tas
Copy link
Author

may-tas commented Oct 8, 2024

Please review the changes @andoriyaprashant I did my best to improve the code quality.

@may-tas
Copy link
Author

may-tas commented Oct 9, 2024

hey @andoriyaprashant , Can you review the PR , as I have did changes in a lot of files, there would be merge conflicts, so if you approve it , I would be able to resolve it fast.
Also please add the label hactoberfest-accepted to the issue and PR.

@may-tas
Copy link
Author

may-tas commented Oct 10, 2024

@andoriyaprashant

@may-tas
Copy link
Author

may-tas commented Oct 12, 2024

Hy @andoriyaprashant , I would appreciate any response from your side.
Thank you.

@may-tas
Copy link
Author

may-tas commented Oct 17, 2024

@andoriyaprashant can you review my PR, as there are a lot of new changes , many merge conflicts have appeared which I would have to resolve.

Copy link

github-actions bot commented Nov 2, 2024

This PR has been automatically closed due to inactivity from the owner for 15 days.

@github-actions github-actions bot added the Stale label Nov 2, 2024
@github-actions github-actions bot closed this Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant