fix: resolve all dart analyze warnings
- Migrate RadioListTile to RadioGroup API (Flutter 3.32+) - Guard BuildContext usage across async gaps - Use const BorderRadius.all / EdgeInsets.all constructors - Extract nested ternaries into helpers - Prefer .first over [0], ??= over if-null assignment - Prefix unused FocusNode params with _ - Add library directive for dangling doc comments
This commit is contained in:
@@ -116,7 +116,7 @@ class _FocusableListTileState extends State<FocusableListTile> {
|
||||
/// A RadioListTile that accepts a FocusNode for keyboard/controller navigation.
|
||||
///
|
||||
/// Uses Flutter's native RadioListTile focus support - no custom styling wrapper.
|
||||
/// Can be used standalone with [groupValue]/[onChanged] or inside a [RadioGroup].
|
||||
/// Requires a [RadioGroup] ancestor to manage selection state.
|
||||
class FocusableRadioListTile<T> extends StatelessWidget {
|
||||
/// The primary content of the list tile.
|
||||
final Widget? title;
|
||||
@@ -130,14 +130,6 @@ class FocusableRadioListTile<T> extends StatelessWidget {
|
||||
/// The value represented by this radio button.
|
||||
final T value;
|
||||
|
||||
/// The currently selected value for the group.
|
||||
/// When provided, the widget works without a [RadioGroup] ancestor.
|
||||
final T? groupValue;
|
||||
|
||||
/// Called when this radio button is selected.
|
||||
/// When provided, the widget works without a [RadioGroup] ancestor.
|
||||
final ValueChanged<T?>? onChanged;
|
||||
|
||||
/// Whether this radio button is part of a vertically dense list.
|
||||
final bool dense;
|
||||
|
||||
@@ -156,8 +148,6 @@ class FocusableRadioListTile<T> extends StatelessWidget {
|
||||
this.subtitle,
|
||||
this.secondary,
|
||||
required this.value,
|
||||
this.groupValue,
|
||||
this.onChanged,
|
||||
this.dense = false,
|
||||
this.focusNode,
|
||||
this.autofocus = false,
|
||||
@@ -171,8 +161,6 @@ class FocusableRadioListTile<T> extends StatelessWidget {
|
||||
subtitle: subtitle,
|
||||
secondary: secondary,
|
||||
value: value,
|
||||
groupValue: groupValue,
|
||||
onChanged: onChanged,
|
||||
dense: dense,
|
||||
focusNode: focusNode,
|
||||
autofocus: autofocus,
|
||||
|
||||
Reference in New Issue
Block a user