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

Refactor and Error Resolution for HomePage UI and Menu Navigation #133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sanvviratthore
Copy link

This PR addresses an issue with undefined methods in the HomePage screen, specifically the showDiffMenu and showQuizMenu methods. These methods, initially located outside the _HomePageState class, caused an undefined method error within the HomePage context.

Key Changes:
Refactored showDiffMenu and showQuizMenu methods to be inside the _HomePageState class.

This allows both methods to be accessed directly within the HomePage context, fixing the undefined method error.
Ensures that difficulty and quiz-type dialogs are properly displayed when called.
UI and Functionality Testing:

Verified that the HomePage UI renders correctly after the refactor.
Tested the navigation flow through showDiffMenu to showQuizMenu, confirming both dialogs display as expected.
Ensured that clicking any quiz option successfully navigates to the appropriate quiz page.
General Code Cleanup:

Simplified button and dialog-related code for clarity and maintainability.

Testing:
Manually tested the changes on the emulator and a physical device.
Verified that all buttons, dialogs, and navigation actions work smoothly without errors or crashes.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Boom! Your pull request just flew into the Quiz-Genius HQ. High fives all around! Our team of tech wizards will check it out and get back to you faster than you can say 'code ninja!' Thanks for leveling up the project!

@KirolosMFahem
Copy link
Collaborator

KirolosMFahem commented Oct 26, 2024

please reference the issue number
@sanvviratthore

@KirolosMFahem
Copy link
Collaborator

The error in the GitHub Actions job is due to several warnings and deprecated uses in the Dart code, which caused the flutter analyze command to fail. Specifically:

  1. Unused imports in multiple files.
  2. Deprecated use of MaterialStateProperty in lib/pages/quiz_page.dart.
  3. Dependency constraints issues with several packages having newer versions.

Steps to Fix:

  1. Remove Unused Imports: Clean up unused imports in the files mentioned in the warnings.
  2. Update Deprecated Code: Replace MaterialStateProperty with WidgetStateProperty in lib/pages/quiz_page.dart.
  3. Update Dependencies: Run flutter pub outdated and update dependencies to compatible versions.

Addressing these issues will resolve the warnings and deprecated uses, allowing the CI to pass.

@KirolosMFahem KirolosMFahem self-requested a review October 27, 2024 18:11
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.

2 participants