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

Implement Theme Management #25

Closed
esmaeil-ahmadipour opened this issue Nov 20, 2024 · 2 comments · Fixed by #33
Closed

Implement Theme Management #25

esmaeil-ahmadipour opened this issue Nov 20, 2024 · 2 comments · Fixed by #33
Assignees
Labels
feature Add/Create new feature

Comments

@esmaeil-ahmadipour
Copy link
Collaborator

esmaeil-ahmadipour commented Nov 20, 2024

Overview

Feature Description

This feature focuses on implementing the theme management system for the application using the BLoC (Business Logic Component) pattern. The goal is to provide a seamless and efficient way to manage the application's light and dark theme modes, with the ability to switch between them dynamically. The theme configuration will be handled globally, ensuring consistency throughout the app.

The objective is to create a scalable and maintainable theme system that allows easy integration of new themes in the future. The BLoC approach will ensure that the theme logic is separated from the UI, making it easier to manage and test. This will also make the app more flexible, allowing users to switch between themes without disrupting the flow or performance.

Click to expand the scenario

Scenario: Testing the Theme Switching

Imagine a developer opens the app to test the theme management system. They start with the app set to its default theme (either light or dark). The app provides a button or switch to toggle between the themes. Upon toggling, the app should smoothly transition to the selected theme without any UI glitches.

The developer navigates between different screens while testing the theme switch to ensure the change is reflected consistently across the entire app. They also test whether the theme preference is retained across app restarts and sessions. This process helps ensure that the theme management system works as expected and provides a smooth user experience.

Design Reference

  • Figma Design: Link to Figma Design
    The design includes both light and dark modes. Ensure the theme toggle aligns with the design specifications for each mode.

  • Responsive Design:
    Responsive adjustments are not required for the theme functionality. Focus on ensuring the correct display of themes on various screen sizes.

@esmaeil-ahmadipour esmaeil-ahmadipour added the feature Add/Create new feature label Nov 20, 2024
@esmaeil-ahmadipour esmaeil-ahmadipour self-assigned this Nov 20, 2024
@b00f
Copy link

b00f commented Nov 21, 2024

Is this will work on Web and Mobile devices as well?

@esmaeil-ahmadipour
Copy link
Collaborator Author

esmaeil-ahmadipour commented Nov 21, 2024

@b00f Yes, this implementation will work seamlessly across Web, Mobile, and Desktop platforms without any exceptions. To persist user preferences for theme changes and reload them upon restarting the application, we utilize the shared_preferences package [link].

This package effectively handles data storage across different environments by leveraging the appropriate local storage mechanism.

For example, on the web, the data is stored in the browser's localStorage , allowing the user's changes to be saved and retrieved easily. Similarly, on mobile and desktop, it uses platform-specific storage solutions to achieve the same functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Add/Create new feature
Projects
None yet
2 participants