-
Notifications
You must be signed in to change notification settings - Fork 16
Fix Flexible widgets in AlertDialog actions causing crashes #240
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
WalkthroughThis update removes unnecessary Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (4)
lib/features/key_manager/key_management_screen.dart (1)
645-679: Add a small gap between the two dialog buttonsAfter removing the
SizedBoxtheTextButtonandElevatedButtonnow sit flush against each other.
A tiny horizontal gap improves readability and follows the default Material-3 spacing.actions: [ TextButton( onPressed: () => Navigator.of(dialogContext).pop(), … - ), + ), + const SizedBox(width: 12), // keep visuals consistent ElevatedButton( onPressed: () {lib/features/relays/widgets/relay_selector.dart (2)
103-144: Restore spacing between the action buttonsSame observation here: the two buttons are now rendered without any space. Insert a fixed
SizedBox(or rely onButtonBar/OverflowBar) so the labels don’t touch on small devices.actions: [ TextButton( onPressed: () { Navigator.pop(dialogContext); }, … - ), + ), + const SizedBox(width: 12), ElevatedButton( onPressed: () {
126-135: Minor: redundanttextAlign
TextAlign.centeris the default forAlertDialogaction labels; it can be removed to trim noise.lib/features/trades/screens/trade_detail_screen.dart (1)
597-627: Add visual separation between YES / NO buttonsWithout the former
SizedBoxthe two buttons weld together. Add an explicit spacer (or wrap the actions with anOverflowBar) to maintain Material spacing.actions: [ TextButton( onPressed: () => Navigator.of(dialogContext).pop(false), … - ), + ), + const SizedBox(width: 12), ElevatedButton( onPressed: () => Navigator.of(dialogContext).pop(true), … ), ],
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
lib/features/key_manager/key_management_screen.dart(1 hunks)lib/features/relays/widgets/relay_selector.dart(2 hunks)lib/features/trades/screens/trade_detail_screen.dart(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
lib/**/*.dart
📄 CodeRabbit Inference Engine (CLAUDE.md)
lib/**/*.dart: UseS.of(context).yourKeyfor all user-facing strings
Always checkmountedbefore using context after async operations
Files:
lib/features/key_manager/key_management_screen.dartlib/features/trades/screens/trade_detail_screen.dartlib/features/relays/widgets/relay_selector.dart
**/*.dart
📄 CodeRabbit Inference Engine (CLAUDE.md)
**/*.dart: Remove unused imports and dependencies
Useconstconstructors where possible
Files:
lib/features/key_manager/key_management_screen.dartlib/features/trades/screens/trade_detail_screen.dartlib/features/relays/widgets/relay_selector.dart
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to **/*.dart : Remove unused imports and dependencies
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to **/*.dart : Use `const` constructors where possible
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: All changes should pass `flutter analyze` before commit
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/**/*.dart : Use `S.of(context).yourKey` for all user-facing strings
lib/features/key_manager/key_management_screen.dart (2)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to lib/**/*.dart : Use S.of(context).yourKey for all user-facing strings
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to **/*.dart : Remove unused imports and dependencies
lib/features/trades/screens/trade_detail_screen.dart (1)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: All changes should pass flutter analyze before commit
lib/features/relays/widgets/relay_selector.dart (1)
Learnt from: CR
PR: MostroP2P/mobile#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T01:48:43.335Z
Learning: Applies to **/*.dart : Remove unused imports and dependencies
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (1)
lib/features/trades/screens/trade_detail_screen.dart (1)
620-624: Ensure button text weight consistent with design specYou changed the “YES” button weight from
w600→w500in this dialog but other confirmations still usew600. Verify with the design guide to avoid inconsistent typography.
grunch
left a comment
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.
tACK
Summary by CodeRabbit
Style
Refactor