-
Notifications
You must be signed in to change notification settings - Fork 0
flutter: QR widget cleanup + SharePlus usage in invite dialog #79
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
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 refines the QR code generation and sharing capabilities within the application. It focuses on removing unnecessary placeholder code related to QR image display and modernizing the sharing mechanism by integrating the 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 PR cleans up the QR widget implementation by removing placeholder stub code and updates the sharing functionality to use SharePlus API. The changes eliminate temporary development stubs and implement proper external dependencies.
- Removed placeholder stub methods and classes that were used during development
- Updated sharing functionality to use SharePlus.instance.share(ShareParams) instead of Share.share()
- Fixed const evaluation issue with CircularProgressIndicator widget
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| await SharePlus.instance.share(ShareParams(text: | ||
| '邀请你加入家庭「$familyName」\n\n' |
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.
The ShareParams constructor call spans multiple lines but is missing proper parameter naming. Consider using named parameter 'text:' explicitly and proper formatting for better readability.
| await SharePlus.instance.share(ShareParams(text: | |
| '邀请你加入家庭「$familyName」\n\n' | |
| await SharePlus.instance.share(ShareParams( | |
| text: '邀请你加入家庭「$familyName」\n\n' |
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 provides some nice cleanups to the qr_code_generator.dart file. It removes placeholder stub code, fixes a minor const evaluation issue, and updates the sharing functionality in the InvitationQrCodeDialog to use the more modern SharePlus.instance.share API. The changes are clear and improve the code quality. I have one suggestion to further improve the readability of the sharing logic.
| onPressed: () async { | ||
| await Share.share( | ||
| await SharePlus.instance.share(ShareParams(text: | ||
| '邀请你加入家庭「$familyName」\n\n' | ||
| '邀请码:$inviteCode\n' | ||
| '点击链接加入:$inviteLink\n\n' | ||
| '有效期:$daysLeft 天', | ||
| ); | ||
| )); | ||
| }, |
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.
For better readability, it's a good practice to extract the multi-line string into a separate variable before passing it to the share method. This makes the code cleaner and easier to understand.
onPressed: () async {
final shareText = '邀请你加入家庭「$familyName」\n\n'
'邀请码:$inviteCode\n'
'点击链接加入:$inviteLink\n\n'
'有效期:$daysLeft 天';
await SharePlus.instance.share(ShareParams(text: shareText));
},
Analyzer: no hard errors. Tests: all green (14/14).