fix: replace print() with developer.log() and withOpacity() with withValues()#18
Conversation
…Values() flutter analyze reported 14 issues on the main branch. This commit fixes all of them without touching any logic: - lib/main.dart, lib/services/chatbot_service.dart Replace all print() calls with developer.log() using a named tag (TranscriptionScreen / ChatbotService) and an error: argument where an exception is being logged. Fixes 9 x avoid_print violations. - lib/main.dart, lib/screens/transcription_detail_screen.dart Replace Color.withOpacity(x) with Color.withValues(alpha: x) to resolve 5 x deprecated_member_use warnings (deprecated in Flutter 3.27). - lib/screens/transcription_detail_screen.dart Remove unused import of flutter_markdown which was never referenced in this file. Fixes 1 x unused_import warning. Result: flutter analyze lib/ reports "No issues found".
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
|
Hey @SISIR-REDDY. As a triageur in AOSSIE, I want to say that open issues before opening any PRs otherwise this will create confusion for contributors. You have not created issues for the PRs you opened. |
|
Please resolve the merge conflicts before review. Your PR will only be reviewed by a maintainer after all conflicts have been resolved. 📺 Watch this video to understand why conflicts occur and how to resolve them: |
Problem
flutter analyzereported 14 issues across the codebase. All of them are straightforward mechanical fixes — no logic was changed.Before:
After:
Issues fixed
avoid_printlib/main.dartavoid_printlib/services/chatbot_service.dartdeprecated_member_use(withOpacity)lib/main.dartdeprecated_member_use(withOpacity)lib/screens/transcription_detail_screen.dartunused_import(flutter_markdown)lib/screens/transcription_detail_screen.dartChanges
lib/main.dart+lib/services/chatbot_service.dartprint()calls withdeveloper.log(). Each call now includes aname:tag (TranscriptionScreenorChatbotService) so log messages are filterable in the DevTools logging view. Exception handlers include anerror:argument so the stack trace is attached.lib/main.dart+lib/screens/transcription_detail_screen.dartColor.withOpacity(x)withColor.withValues(alpha: x).withOpacitywas deprecated in Flutter 3.27 in favour ofwithValueswhich avoids a precision loss when converting the opacity to the internal color representation.lib/screens/transcription_detail_screen.dartimport 'package:flutter_markdown/flutter_markdown.dart'— the import was never used in this file after an earlier refactor.Testing
flutter analyze lib/ # No issues found!