CXMM-10356 TestJira2Pr: Add dark mode to sample test app - #1
Open
ssharma-Localytics wants to merge 1 commit into
Open
CXMM-10356 TestJira2Pr: Add dark mode to sample test app#1ssharma-Localytics wants to merge 1 commit into
ssharma-Localytics wants to merge 1 commit into
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.
Ticket CXMM-10356
Added app-wide dark mode support by making
LocalyticsSampleAppstateful with light and darkThemeDatavariants, wiringthemeModeonMaterialApp, and placing a top AppBar icon button to toggle between light and dark. Existing UI already reads colors and text styles from the theme, so all screens and buttons follow the selected mode. Widget tests cover the toggle button and theme switching behavior.Testing
flutter test— both widget tests should pass.Note
Low Risk
Sample-app UI and test-only changes with no auth, data, or SDK integration changes beyond presentation.
Overview
Adds app-wide light/dark mode to the Localytics Flutter sample by making the root app stateful, defining shared light and dark
ThemeDatavia_appTheme, and drivingMaterialAppwiththemeMode.An AppBar icon toggles between modes (tooltips and sun/moon icons flip with the current mode). Theme state is passed into
_HomePageso the toggle lives on the home screen without changing Localytics SDK demo behavior.Widget tests assert the toggle is present on the home screen and that tapping it updates
MaterialApp.themeModelight → dark → light.Reviewed by Cursor Bugbot for commit d713202. Bugbot is set up for automated code reviews on this repo. Configure here.