Skip to content

fix(ui): dynamic background and text colors in AuthScreenWrapper#210

Open
dhruvi-16-me wants to merge 2 commits intoAOSSIE-Org:mainfrom
dhruvi-16-me:auth-screen-theme-fix
Open

fix(ui): dynamic background and text colors in AuthScreenWrapper#210
dhruvi-16-me wants to merge 2 commits intoAOSSIE-Org:mainfrom
dhruvi-16-me:auth-screen-theme-fix

Conversation

@dhruvi-16-me
Copy link
Copy Markdown
Contributor

@dhruvi-16-me dhruvi-16-me commented Mar 6, 2026

Closes #211

📝 Description

This pull request addresses a visual inconsistency where the authentication screens (Login and Signup) did not respect the application's theme settings. Previously, the AuthScreenWrapper used a hardcoded dark background color, and the title text was hardcoded to white. These changes ensure that the authentication flow now dynamically adapts to both light and dark modes, providing a consistent user experience across the app.

🔧 Changes Made

  • Dynamic Background Coloring: Updated lib/widgets/custom_widgets.dart to replace the hardcoded background color (0xFF1A1A1A) in the AuthScreenWrapper with Theme.of(context).scaffoldBackgroundColor.
  • Theme-Aware Typography: Modified the title text style within AuthScreenWrapper to use the theme's display text color instead of hardcoded Colors.white, preventing visibility issues on light backgrounds.
  • Improved Theme Integration: Ensured the authentication wrapper correctly utilizes the surface and background definitions established in lib/theme/app_themes.dart.

📷 Screenshots or Visual Changes (if applicable)

  • Light Mode: The background now correctly displays as 0xFFF0F0F0 with high-contrast dark text.
  • Dark Mode: The background remains consistent with the 0xFF1A1A1A scaffold color defined in the dark theme.

✅ Checklist

  • I have read the contributing guidelines.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if applicable).
  • Any dependent changes have been merged and published in downstream modules.

Summary by CodeRabbit

  • Style
    • Inputs and icons now adapt to the app color scheme for improved contrast and consistency.
    • Label, hint and border colors updated for clearer text field states.
    • Authentication screens now use the app’s scaffold background and theme typography for consistent look and spacing.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f0453b88-78a8-40bb-aba7-a69c0af28f1e

📥 Commits

Reviewing files that changed from the base of the PR and between 2ef7894 and 8786319.

📒 Files selected for processing (1)
  • lib/widgets/custom_widgets.dart

Walkthrough

Replaced hardcoded colors and some direct Theme.of(context).colorScheme usages with a local theme/colorScheme variable in CustomTextField and AuthScreenWrapper; updated text, icon, fill, border, and background colors and adjusted title/subtitle styles to use theme typography and colorScheme values.

Changes

Cohort / File(s) Summary
Theme-aware color refactor
lib/widgets/custom_widgets.dart
Replaced hardcoded color values and direct Theme calls with a local theme and colorScheme. Updated CustomTextField text, label, hint, prefixIcon, fill, and border colors (use colorScheme.onSurface, .onSurfaceVariant, .outline). Updated AuthScreenWrapper scaffold background to theme.scaffoldBackgroundColor, title to theme.textTheme.displayLarge with onSurface fallback, and subtitle to colorScheme.onSurfaceVariant.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

Dart/Flutter

Suggested reviewers

  • jddeep

Poem

🐰 I hopped through code with a twitch of my nose,
I swapped stubborn colors for theme-friendly clothes.
Now fields and titles in daylight or night,
Dance with colorScheme, looking just right.
Hop—refresh the app, enjoy the new sight!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing dynamic background and text colors in AuthScreenWrapper to respect theme settings.
Linked Issues check ✅ Passed The PR addresses all primary coding requirements from issue #211: replacing hardcoded background color with scaffoldBackgroundColor and updating title text to use theme-based styles.
Out of Scope Changes check ✅ Passed All changes in custom_widgets.dart are directly related to fixing theme adaptation in AuthScreenWrapper and CustomTextField, with no unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can generate a title for your PR based on the changes with custom instructions.

Set the reviews.auto_title_instructions setting to generate a title for your PR based on the changes in the PR with custom instructions.

@dhruvi-16-me
Copy link
Copy Markdown
Contributor Author

dhruvi-16-me commented Mar 6, 2026

Screenrecording_20260306_170427.mp4

Hey @SharkyBytes @jddeep Check this PR. Please merge.

@SharkyBytes
Copy link
Copy Markdown
Collaborator

good wrk! resolve the conflicts

@dhruvi-16-me
Copy link
Copy Markdown
Contributor Author

@SharkyBytes conflicts resolved. Please merge.

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.

BUG: Hardcoded Background and Text Colors in AuthScreenWrapper Prevents Theme Adaptation

2 participants