IMGIITRoorkee / IMGIITRoorkee/placement-flutter

Add pull-to-refresh to the profile screen

Open
#59 0 comments 0 reactions 0 assignees View on GitHub
bug P2
Dominant language
Dart
Stars
3
Forks
10
Avg merge
8d 21h
Merged PRs (30d)
4

Description

**Problem**

Candidate data is fetched once per app launch, cached in a global, and cleared only on logout. The profile screen has no refresh affordance.

Applying to a company deducts `applicationCost` from the student's credit pool server-side, but the profile keeps showing the old balance until the app is force-killed.

**Where**

- `lib/services/generic/applyService.dart:43-64` (cache short-circuit at :44)
- `lib/shared/GlobalCache.dart:15`
- `lib/views/CandidateDetailsView.dart:33-42` (no `RefreshIndicator`)
- Server-side deduction: `omniport-app-placement-and-internship/views/application.py:159-163`

**Expected**

Pull to refresh re-fetches the candidate, including the credit balance.

**Fix sketch**

- Add a `refreshAndWait` to `CandidateDetailsViewModel` that nulls the cached candidate and refetches, mirroring `ProfilesForMeViewModel`.
- Wrap the body in a `RefreshIndicator`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with lib/views/CandidateDetailsView.dart:33-42 and locate CandidateDetailsViewModel, then compare its fetching flow with ProfilesForMeViewModel. Read the cache short-circuit in lib/services/generic/applyService.dart:43-64 and lib/shared/GlobalCache.dart:15. Done means pulling on the profile refetches candidate data and displays the updated credit balance.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.