Skip to content

fix: Remove unused declarations (unused_element, unused_field, unused_local_variable) #199

Description

@Muneerali199

Summary

flutter analyze reports several unused declaration warnings across both apps. Unused code is dead weight — it confuses readers and can indicate logic that was never wired up correctly.

Affected Declarations

patient app

File Symbol Kind
lib/presentation/activities/daily_activities_screen.dart:41 _animateProgress unused_element (private method)
lib/provider/appointments_provider.dart:151 _formatTimeOfDay unused_element (private method)
lib/provider/task_provider.dart:9 _apiStatus unused_field (private field)

therapist app

File Symbol Kind
lib/presentation/auth/auth_screen.dart:48 isNewUser unused_local_variable
lib/presentation/consultation/consultation_request_detail_screen.dart:375 _buildNotesSection unused_element (private method)
lib/presentation/consultation/consultation_request_detail_screen.dart:483 _buildDetailRow unused_element (private method)
lib/presentation/home/home_screen.dart:286 _buildConsultationRequestSection unused_element (private method)
lib/presentation/therapy_goals/add_therapy_details_screen.dart:235 key parameter unused_element_parameter

Steps to Reproduce

cd patient && flutter analyze
cd ../therapist && flutter analyze

Fix

  • Remove unused private methods, fields, and local variables.
  • For the unused key parameter: remove the optional parameter or use it correctly.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions