Skip to content

fix(patient): Remove unused and duplicate imports across patient app#200

Open
Muneerali199 wants to merge 1 commit intoAOSSIE-Org:mainfrom
Muneerali199:fix/patient-unused-imports
Open

fix(patient): Remove unused and duplicate imports across patient app#200
Muneerali199 wants to merge 1 commit intoAOSSIE-Org:mainfrom
Muneerali199:fix/patient-unused-imports

Conversation

@Muneerali199
Copy link
Copy Markdown

@Muneerali199 Muneerali199 commented Mar 13, 2026

Summary

Fixes #195

Removes 10 unused_import warnings and 2 duplicate_import warnings flagged by flutter analyze in the patient/ app.

Changes

File Action
lib/core/repository/auth/auth_repository.dart Removed unused flutter/material.dart import
lib/presentation/assessments/assessment_screen.dart Removed unused result.dart import
lib/presentation/auth/consultation_request_screen.dart Removed unused auth.dart and slot_booking_card.dart imports
lib/presentation/auth/consultation_slot_booking_screen.dart Removed unused auth_provider.dart and provider.dart imports
lib/presentation/auth/personal_details_screen.dart Removed unused assessment_screen.dart, home_screen.dart, and duplicate assessments_list_screen.dart import
lib/presentation/result/result.dart Removed unused dart:convert, flutter_dotenv, and http imports
lib/provider/reports_provider.dart Removed unused assets.gen.dart import
lib/provider/therapist_provider.dart Removed unused flutter_dotenv, assessment_card_model.dart, supabase_assessments_repository.dart imports and duplicate flutter/material.dart import

Before

flutter analyze patient/
# 119 issues — including 10 unused_import warnings and 2 duplicate_import warnings

After

flutter analyze patient/
# 99 issues — all unused_import and duplicate_import warnings resolved

Checklist

  • All removed imports verified as genuinely unused (no references anywhere in the file)
  • flutter analyze run after changes — no new warnings introduced
  • No logic changes — import-only cleanup

Summary by CodeRabbit

  • Chores
    • Conducted comprehensive code cleanup by removing unused dependencies across multiple modules throughout the application. This refactoring effort improves code organization, reduces unnecessary clutter, and enhances overall maintainability. No changes to user-facing functionality, application behavior, or public APIs.

Resolves 10 unused_import and 2 duplicate_import warnings reported by
flutter analyze. Affected files: auth_repository.dart,
assessment_screen.dart, consultation_request_screen.dart,
consultation_slot_booking_screen.dart, personal_details_screen.dart,
result.dart, reports_provider.dart, therapist_provider.dart.

Closes AOSSIE-Org#195
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 93ed5ffd-78a4-4420-9f56-f50fc4de622d

📥 Commits

Reviewing files that changed from the base of the PR and between 051a4f3 and 91c1be8.

📒 Files selected for processing (8)
  • patient/lib/core/repository/auth/auth_repository.dart
  • patient/lib/presentation/assessments/assessment_screen.dart
  • patient/lib/presentation/auth/consultation_request_screen.dart
  • patient/lib/presentation/auth/consultation_slot_booking_screen.dart
  • patient/lib/presentation/auth/personal_details_screen.dart
  • patient/lib/presentation/result/result.dart
  • patient/lib/provider/reports_provider.dart
  • patient/lib/provider/therapist_provider.dart
💤 Files with no reviewable changes (8)
  • patient/lib/presentation/assessments/assessment_screen.dart
  • patient/lib/presentation/result/result.dart
  • patient/lib/core/repository/auth/auth_repository.dart
  • patient/lib/provider/therapist_provider.dart
  • patient/lib/provider/reports_provider.dart
  • patient/lib/presentation/auth/consultation_request_screen.dart
  • patient/lib/presentation/auth/personal_details_screen.dart
  • patient/lib/presentation/auth/consultation_slot_booking_screen.dart

📝 Walkthrough

Walkthrough

This PR removes unused and duplicate import statements across 8 files in the patient app, addressing warnings identified by flutter analyze without altering any runtime behavior or logic.

Changes

Cohort / File(s) Summary
Core Repository Cleanup
lib/core/repository/auth/auth_repository.dart
Removed 3 unused imports: flutter/material.dart, PersonalInfoEntity, and Result.
Presentation Assessments & Results
lib/presentation/assessments/assessment_screen.dart, lib/presentation/result/result.dart
Removed unused imports across files: result.dart removed from assessment_screen; dart:convert, flutter_dotenv, and http removed from result.dart.
Presentation Auth Screens
lib/presentation/auth/consultation_request_screen.dart, lib/presentation/auth/consultation_slot_booking_screen.dart, lib/presentation/auth/personal_details_screen.dart
Removed unused and duplicate imports: consultation_request_screen removed auth.dart and slot_booking_card.dart; consultation_slot_booking_screen removed auth_provider.dart and provider.dart; personal_details_screen removed assessment_screen.dart, home_screen.dart, and duplicate assessments_list_screen.dart.
Providers
lib/provider/reports_provider.dart, lib/provider/therapist_provider.dart
Removed unused imports: reports_provider removed assets.gen.dart; therapist_provider removed flutter_dotenv, assessment_card_model.dart, supabase_assessments_repository.dart, and duplicate flutter/material.dart.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 With whiskers bright and careful eye,
I swept unused imports by-and-by,
No duplicate clutter shall remain,
Just clean code flows like gentle rain,
The warnings flee, the build shines bright! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately and concisely describes the main change: removing unused and duplicate imports across the patient app, directly matching the changeset.
Linked Issues check ✅ Passed All 10 unused imports and 2 duplicate imports flagged in issue #195 across 8 files have been removed, meeting all coding requirements to eliminate flutter analyze warnings.
Out of Scope Changes check ✅ Passed All changes are exclusively import removals aligned with issue #195 requirements; no logic modifications, new features, or out-of-scope alterations detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(patient): Remove unused and duplicate imports across patient app

1 participant