Skip to content

fix: replace hardcoded colors in AuthScreenWrapper with theme-aware colors#231

Closed
Satyanarayana001 wants to merge 1 commit intoAOSSIE-Org:mainfrom
Satyanarayana001:fix/hardcoded-colors-auth-wrapper
Closed

fix: replace hardcoded colors in AuthScreenWrapper with theme-aware colors#231
Satyanarayana001 wants to merge 1 commit intoAOSSIE-Org:mainfrom
Satyanarayana001:fix/hardcoded-colors-auth-wrapper

Conversation

@Satyanarayana001
Copy link
Copy Markdown

@Satyanarayana001 Satyanarayana001 commented Mar 20, 2026

Fixes #211

Problem

AuthScreenWrapper had 3 hardcoded colors preventing
theme adaptation:

  • Background: const Color(0xFF1A1A1A) — always dark
  • Title: Colors.white — invisible in light mode
  • Subtitle: Colors.grey.shade400 — ignores theme

Fix

  • Background: Theme.of(context).scaffoldBackgroundColor
  • Title: Theme.of(context).textTheme.headlineLarge
  • Subtitle: Theme.of(context).colorScheme.onSurfaceVariant

Summary by CodeRabbit

  • Refactor
    • Authentication screen now respects the app's theme settings for colors and typography, ensuring consistent appearance across different themes.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 20, 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: c402e9de-840f-4c11-8686-cd84f552bcce

📥 Commits

Reviewing files that changed from the base of the PR and between 5afe656 and 4a11bdc.

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

Walkthrough

The AuthScreenWrapper widget's hard-coded color values are replaced with theme-aware styling. The scaffold background now uses Theme.of(context).scaffoldBackgroundColor, and both title and subtitle text leverage theme text styles with appropriate semantic color schemes instead of fixed hex values and Colors constants.

Changes

Cohort / File(s) Summary
Theme Adaptation in AuthScreenWrapper
lib/widgets/custom_widgets.dart
Replaced hard-coded background color (Color(0xFF1A1A1A)) with scaffoldBackgroundColor from theme context. Updated title text styling to use textTheme.headlineLarge with theme-based formatting. Updated subtitle text styling to use textTheme.bodyLarge with onSurfaceVariant color scheme.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

Dart/Flutter

Suggested reviewers

  • jddeep

Poem

🐰✨ Hard-coded colors fade away,
Theme adapts both night and day!
Light and dark dance hand in hand,
Colors now obey theme's command.
AuthScreenWrapper, once so grey,
Now adapts the stylish way! 🎨

🚥 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 clearly and accurately summarizes the main change: replacing hardcoded colors in AuthScreenWrapper with theme-aware alternatives.
Linked Issues check ✅ Passed All three objectives from issue #211 are met: scaffold background uses Theme.of(context).scaffoldBackgroundColor, title uses textTheme.headlineLarge, and subtitle uses colorScheme.onSurfaceVariant.
Out of Scope Changes check ✅ Passed All changes are scoped to fixing hardcoded colors in AuthScreenWrapper as required by issue #211; no unrelated modifications are present.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 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.

@dhruvi-16-me
Copy link
Copy Markdown
Contributor

Hey @SharkyBytes I am closing this PR since this is a duplicate of PR #210. Hey @Satyanarayana001, try to avoid working on duplicate PRs. Thanks for your contribution though!

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