IMGIITRoorkee / IMGIITRoorkee/placement-flutter
Add dark mode and fix the theme built from ThemeData.fallback
Nobody has claimed this yet.
- 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 aboveMaterialApp)- 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 adddarkThemeplusthemeMode: ThemeMode.system. - Replace the colour literals with
colorSchemeandtextThemelookups. - Check
lib/themes/theme.darton the unmergedorigin/betabranch before rewriting this from scratch; it may already be most of the work.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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