@@ -101,14 +101,16 @@ class _ClassFilterDialogState extends State<ClassFilterDialog> {
101101 final textFieldLeftPadding = scaleByFontFactor (40.0 );
102102 void onTypeChanged (ClassFilterType ? type) => setState (() => _type = type! );
103103
104- RadioButton <ClassFilterType > radio (ClassFilterType type, String label) =>
105- RadioButton <ClassFilterType >(
106- label: label,
107- itemValue: type,
108- groupValue: _type,
109- onChanged: onTypeChanged,
110- radioKey: Key (type.toString ()),
111- );
104+ Widget radio (ClassFilterType type, String label) => Row (
105+ children: [
106+ Radio <ClassFilterType >(
107+ value: type,
108+ materialTapTargetSize: MaterialTapTargetSize .shrinkWrap,
109+ key: Key (type.toString ()),
110+ ),
111+ Expanded (child: Text (label, overflow: TextOverflow .ellipsis)),
112+ ],
113+ );
112114
113115 Widget textField (TextEditingController controller) => Padding (
114116 padding: EdgeInsets .only (left: textFieldLeftPadding),
@@ -143,18 +145,22 @@ class _ClassFilterDialogState extends State<ClassFilterDialog> {
143145 );
144146 widget.onChanged (newFilter);
145147 },
146- child: Column (
147- mainAxisSize: MainAxisSize .min,
148- crossAxisAlignment: CrossAxisAlignment .start,
149- children: [
150- radio (ClassFilterType .showAll, 'Show all classes' ),
151- const SizedBox (height: defaultSpacing),
152- radio (ClassFilterType .except, 'Show all classes except:' ),
153- textField (_except),
154- const SizedBox (height: defaultSpacing),
155- radio (ClassFilterType .only, 'Show only:' ),
156- textField (_only),
157- ],
148+ child: RadioGroup (
149+ groupValue: _type,
150+ onChanged: onTypeChanged,
151+ child: Column (
152+ mainAxisSize: MainAxisSize .min,
153+ crossAxisAlignment: CrossAxisAlignment .start,
154+ children: [
155+ radio (ClassFilterType .showAll, 'Show all classes' ),
156+ const SizedBox (height: defaultSpacing),
157+ radio (ClassFilterType .except, 'Show all classes except:' ),
158+ textField (_except),
159+ const SizedBox (height: defaultSpacing),
160+ radio (ClassFilterType .only, 'Show only:' ),
161+ textField (_only),
162+ ],
163+ ),
158164 ),
159165 );
160166 }
0 commit comments