IMGIITRoorkee / IMGIITRoorkee/placement-flutter
Dispose controllers in SignIn and both results-detail screens
- Dominant language
- Dart
- Stars
- 3
- Forks
- 10
- Avg merge
- 8d 21h
- Merged PRs (30d)
- 4
Description
**Problem**
Three `State` classes create controllers and never override `dispose()`, including the sign-in screen's password `TextEditingController`.
Both results-detail screens additionally call `addListener` on their `AnimationController` every time the search overlay opens and never remove it, so listeners accumulate per search-open. Neither removes its `OverlayEntry` on dispose.
With `TickerProviderStateMixin`, popping one of these screens mid-animation trips the "disposed with an active Ticker" assertion in debug builds.
**Where**
- `lib/screens/authenticate/signIn.dart:17-18` (two `TextEditingController`s), `:22-26` (two `AnimationController`s), no `dispose`
- `lib/screens/home/screens_for_result_details/resultDetailsBranchWise.dart:22`, `:118-120`
- `lib/screens/home/screens_for_result_details/resultDetailsCompanyWise.dart:22`, `:119-121`
**Expected**
Every controller disposed, listeners registered once.
**Fix sketch**
- Add `dispose()` to all three classes.
- Move `addListener` into `initState`.
- Remove the `OverlayEntry` in `dispose` if it is still mounted.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the three State classes in lib/screens/authenticate/signIn.dart, lib/screens/home/screens_for_result_details/resultDetailsBranchWise.dart, and lib/screens/home/screens_for_result_details/resultDetailsCompanyWise.dart. Inspect their controller, listener, overlay, and animation lifecycles, then verify that each controller is disposed, listeners are registered once, and any mounted OverlayEntry is removed when the screen is disposed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100