Skip to content

fix: replace print() with developer.log() and withOpacity() with withValues()#18

Open
SISIR-REDDY wants to merge 1 commit intoAOSSIE-Org:mainfrom
SISIR-REDDY:fix/lint-deprecation-warnings-clean
Open

fix: replace print() with developer.log() and withOpacity() with withValues()#18
SISIR-REDDY wants to merge 1 commit intoAOSSIE-Org:mainfrom
SISIR-REDDY:fix/lint-deprecation-warnings-clean

Conversation

@SISIR-REDDY
Copy link
Copy Markdown

Problem

flutter analyze reported 14 issues across the codebase. All of them are straightforward mechanical fixes — no logic was changed.

Before:

14 issues found.

After:

No issues found!

Issues fixed

Count Rule File(s)
6 avoid_print lib/main.dart
3 avoid_print lib/services/chatbot_service.dart
3 deprecated_member_use (withOpacity) lib/main.dart
2 deprecated_member_use (withOpacity) lib/screens/transcription_detail_screen.dart
1 unused_import (flutter_markdown) lib/screens/transcription_detail_screen.dart

Changes

lib/main.dart + lib/services/chatbot_service.dart

  • Replaced all print() calls with developer.log(). Each call now includes a name: tag (TranscriptionScreen or ChatbotService) so log messages are filterable in the DevTools logging view. Exception handlers include an error: argument so the stack trace is attached.

lib/main.dart + lib/screens/transcription_detail_screen.dart

  • Replaced Color.withOpacity(x) with Color.withValues(alpha: x). withOpacity was deprecated in Flutter 3.27 in favour of withValues which avoids a precision loss when converting the opacity to the internal color representation.

lib/screens/transcription_detail_screen.dart

  • Removed import '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!

…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".
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 14, 2026

Warning

Rate limit exceeded

@SISIR-REDDY has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 23 minutes and 9 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0f82b18b-15db-42d7-81e1-4b6a945f3af3

📥 Commits

Reviewing files that changed from the base of the PR and between ece30ed and 6765b8e.

📒 Files selected for processing (3)
  • lib/main.dart
  • lib/screens/transcription_detail_screen.dart
  • lib/services/chatbot_service.dart
✨ 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.

@dhruvi-16-me
Copy link
Copy Markdown

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.
Wait for the issue to be reviewed and assigned. This would keep the project clean and easier for @SharkyBytes to review.

@github-actions
Copy link
Copy Markdown

⚠️ This PR has merge conflicts.

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:
https://www.youtube.com/watch?v=Sqsz1-o7nXk

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants