AOSSIE-Org / AOSSIE-Org/NeuroTrack

BUG: Discarded Provider.of call in AuthScreen causes unnecessary widget rebuilds

オープン
#186 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Dart
スター
29
フォーク
50
PR マージ指標
30日以内にマージされた PR はありません

説明

### Is there an existing issue for this?

- [x] I have searched the existing issues

### What happened?

## Description
In `auth_screen.dart`, inside the `build()` method, there is a `Provider.of`
call whose return value is immediately discarded:

## Current Behavior
Provider.of(context, listen: true).authNavigationStatus;

This line forces a full widget rebuild every time AuthProvider changes,
even though the value is never used in the UI. This is a silent performance
issue that can cause janky behavior on low-end devices.

## Expected Behavior
Rebuilds should only happen when the value is actually consumed by the UI.
The navigation logic is already handled in `didChangeDependencies`,
making this line redundant.

## Proposed Fix
Remove the redundant line entirely, since `didChangeDependencies` already
reacts to AuthProvider changes for navigation purposes.

## File
lib/presentation/auth/auth_screen.dart — build() method

### Record

- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。