IMGIITRoorkee / IMGIITRoorkee/placement-flutter

Add dark mode and fix the theme built from ThemeData.fallback

Open
#56 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement P2
Dominant language
Dart
Stars
3
Forks
10
Avg merge
8d 21h
Merged PRs (30d)
4

Description

Problem

Raised in the placement meeting. There is no dark mode, and the theming is not in a state where adding one is a small change.

The theme is built with Theme.of(context).copyWith(...) where the context sits above MaterialApp, so the base is ThemeData.fallback() rather than a real theme. There is no darkTheme and no themeMode. Separately, 44 hardcoded colour literals in lib/ would not follow a theme even if one existed.

Where

  • lib/main.dart:20-44 (theme built from a context above MaterialApp)
  • Examples of hardcoded colours: lib/views/CandidateDetailsView.dart:211, lib/views/CompanyDetailView.dart:216

Expected

Light and dark both work and follow the system setting.

Fix sketch

  • Replace the theme with ThemeData(colorScheme: ColorScheme.fromSeed(seed: R.primaryCol)), and add darkTheme plus themeMode: ThemeMode.system.
  • Replace the colour literals with colorScheme and textTheme lookups.
  • Check lib/themes/theme.dart on the unmerged origin/beta branch before rewriting this from scratch; it may already be most of the work.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/main.dart:20-44 to inspect how the theme is built, then check lib/themes/theme.dart on the unmerged origin/beta branch before changing it. Search lib/ for the 44 hardcoded colour literals, including lib/views/CandidateDetailsView.dart:211 and lib/views/CompanyDetailView.dart:216. Done means light and dark themes follow the system setting and colours use theme lookups.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
design, mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.