Migrate Radio to RadioGroup widget#35
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates RadioListTile widgets to use the new RadioGroup wrapper widget, which is a Flutter 3.27+ Material 3 feature that simplifies radio button group management by eliminating the need to pass groupValue and onChanged to each individual radio button. The PR also includes extensive code modernization updates aligned with Flutter 3.27+ deprecations and best practices.
Changes:
- Migrated two radio button groups to use
RadioGroupwrapper (inrefine_tags_sheet.dartandlanguage_section.dart) - Updated opacity handling from deprecated
withOpacity()towithValues(alpha:)throughout the codebase - Replaced deprecated
WillPopScopewithPopScopeAPI - Modernized Material 3 color scheme usage (
surfaceVariant→surfaceContainerHighest) - Converted
printstatements todebugPrintfor better Flutter integration - General code cleanup: removed unused imports, variables, and functions; improved string interpolation; removed unnecessary
.toList()calls
Reviewed changes
Copilot reviewed 80 out of 81 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/widgets/refine_tags_sheet.dart | Migrated operator profile radio buttons to RadioGroup |
| lib/screens/settings/sections/language_section.dart | Migrated language selection radio buttons to RadioGroup |
| scripts/validate_localizations.dart | Bug: Incorrectly changed print to debugPrint in standalone Dart script |
| lib/widgets/*.dart (multiple) | Updated deprecated withOpacity() calls to withValues(alpha:) |
| lib/widgets/nuclear_reset_dialog.dart | Migrated WillPopScope to PopScope |
| lib/services/*.dart (multiple) | Converted print to debugPrint and code cleanup |
| lib/screens/*.dart (multiple) | Material 3 color updates and code cleanup |
| test/*.dart | Updated test imports and removed unused test file |
| pubspec.yaml, pubspec.lock | Added flutter_lints and collection dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
948a732 to
846fabe
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 77 out of 79 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
lib/screens/settings/sections/language_section.dart:51
_setLanguageawaitsLocalizationService.instance.setLanguage(...)and then callssetStatewithout checkingmounted. If the widget is disposed during the await, this will throw. Add aif (!mounted) return;guard beforesetState.
Future<void> _setLanguage(String? languageCode) async {
await LocalizationService.instance.setLanguage(languageCode);
setState(() {
_selectedLanguage = languageCode;
});
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f318893 to
ef5609f
Compare
Migrate all withOpacity() calls to withValues(alpha:) and surfaceVariant to surfaceContainerHighest across the codebase. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes avoid_print lint warnings by using debugPrint which respects release mode and avoids console overflow on mobile platforms. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ef5609f to
e4b3671
Compare
The RadioGroup widget (used in language_section.dart and refine_tags_sheet.dart since the PR FoggedLens#35 migration) requires Flutter 3.35+ / Dart 3.8+. The old constraint (>=3.5.0) allowed older SDKs that don't have RadioGroup, causing cryptic build errors instead of a clear version mismatch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ement The RadioGroup widget (merged via PR FoggedLens#35) requires Flutter 3.35+ / Dart 3.8+. The old constraint (>=3.5.0) allowed older SDKs that don't have RadioGroup, causing cryptic build errors instead of a clear version mismatch from pub get. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ement The RadioGroup widget (merged via PR FoggedLens#35) requires Flutter 3.35+ / Dart 3.8+. The old constraint (>=3.5.0) allowed older SDKs that don't have RadioGroup, causing cryptic build errors instead of a clear version mismatch from pub get. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The RadioGroup widget (used in language_section.dart and refine_tags_sheet.dart since the PR FoggedLens#35 migration) requires Flutter 3.35+ / Dart 3.8+. The old constraint (>=3.5.0) allowed older SDKs that don't have RadioGroup, causing cryptic build errors instead of a clear version mismatch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
RadiowithgroupValue/onChangedtoRadioGroupwidget per Flutter deprecationTest plan
flutter analyzewith zero warnings🤖 Generated with Claude Code