-
Notifications
You must be signed in to change notification settings - Fork 0
flutter: analyzer cleanup batch 10-B — small unused removals + safe imports #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…nce.share with ShareParams; add cross_file import
…nd leftover stub; fix const usage; migrate invite dialog share to SharePlus.instance
…/locals; capture messenger in batch dialogs; restore RightClickCopy with post-await safety; tidy comments
…action); batch_operation_bar context-safety ignores
…res; tidy image_utils comment
…ics to BalancePoint/dynamic/Transaction
… add intl import; doc _getCurrencySymbol; tidy source_badge
…rencySymbol; no behavior change
Summary of ChangesHello @zensgit, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on a batch of analyzer cleanups, primarily removing unused code elements such as local variables, private methods, and imports. It also includes important refactoring to ensure safer handling of Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request performs analyzer cleanup to remove unused variables and improve code maintainability by removing dead code and reorganizing imports. The changes focus on removing unused local variables, eliminating unused methods, and optimizing imports across multiple Flutter components.
- Removed unused local variables (
cs,theme,currencyFormatter) and static field (_lastGlobalFailure) - Eliminated unused
_getCurrencySymbolmethod from AccountCard and reorganized imports - Refactored context usage patterns to avoid build context issues in async operations
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| source_badge.dart | Removed unused cs variable from colorScheme |
| right_click_copy.dart | Refactored to avoid build context usage in async operations |
| batch_operation_bar.dart | Extracted Navigator and ScaffoldMessenger references to avoid context issues |
| image_utils.dart | Removed unused image extension validation logic |
| transaction_list.dart | Removed unused currency_provider import |
| loading_widget.dart | Removed unused theme variable |
| dashboard_overview.dart | Updated type aliases and removed unused import |
| account_card.dart | Removed unused variables and _getCurrencySymbol method, reorganized imports |
| retry_interceptor.dart | Removed unused _lastGlobalFailure static field |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| ]; | ||
|
|
||
| // Allow URLs without extensions (many CDNs don't use them) | ||
| // Check for common image extensions// Allow URLs without extensions (many CDNs don't use them) |
Copilot
AI
Sep 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space between comments. Should be // Check for common image extensions // Allow URLs without extensions (many CDNs don't use them)
| // Check for common image extensions// Allow URLs without extensions (many CDNs don't use them) | |
| // Check for common image extensions | |
| // Allow URLs without extensions (many CDNs don't use them) |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request does a great job of cleaning up the codebase by removing unused variables, imports, and methods. The refactoring to ensure safer BuildContext usage across async gaps is also a significant improvement. I've added a couple of suggestions to further enhance type safety and code readability.
| final List<QuickActionData> quickActions; | ||
| final List<TransactionData> recentTransactions; | ||
| final List<BalancePoint> balanceData; | ||
| final List<dynamic> quickActions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using List<dynamic> for quickActions reduces type safety and makes the code harder to understand and maintain. It's better to define and use a specific data class, like QuickActionData, to ensure a clear data contract for DashboardData. This will improve code clarity and help prevent potential runtime errors.
| final List<dynamic> quickActions; | |
| final List<QuickActionData> quickActions; |
| ]; | ||
|
|
||
| // Allow URLs without extensions (many CDNs don't use them) | ||
| // Check for common image extensions// Allow URLs without extensions (many CDNs don't use them) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two comments have been merged onto a single line, which harms readability. Please split them into separate lines for clarity.
| // Check for common image extensions// Allow URLs without extensions (many CDNs don't use them) | |
| // Check for common image extensions | |
| // Allow URLs without extensions (many CDNs don't use them) |
Validation: tests green; analyzer OK for changed areas