Skip to content

Commit 84dd066

Browse files
feat: fix minor lints
1 parent c95d25a commit 84dd066

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

example/lib/sources/decorated_radio_checkbox.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ class _DecoratedRadioCheckboxState extends State<DecoratedRadioCheckbox> {
156156

157157
/// options using column of widgets for the label
158158
/// We can force a min width by creating a sized box so we don't need another parameter
159-
List<FormBuilderFieldOption> getDemoOptionsWidgets({forceMinWidth = 0.0}) {
159+
List<FormBuilderFieldOption> getDemoOptionsWidgets({
160+
double forceMinWidth = 0.0,
161+
}) {
160162
return [
161163
FormBuilderFieldOption(
162164
value: "airplane",

lib/src/fields/form_builder_switch.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class FormBuilderSwitch extends FormBuilderFieldDecoration<bool> {
136136
field.didChange(value);
137137
}
138138
: null,
139-
activeColor: activeColor,
139+
activeThumbColor: activeColor,
140140
activeThumbImage: activeThumbImage,
141141
activeTrackColor: activeTrackColor,
142142
inactiveThumbColor: inactiveThumbColor,

lib/src/form_builder_field.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ class FormBuilderField<T> extends FormField<T> {
3737
/// Called when the field value is changed.
3838
final ValueChanged<T?>? onChanged;
3939

40-
/// Called when the field value is reset.
41-
final VoidCallback? onReset;
42-
4340
/// {@macro flutter.widgets.Focus.focusNode}
4441
final FocusNode? focusNode;
4542

@@ -54,10 +51,10 @@ class FormBuilderField<T> extends FormField<T> {
5451
super.restorationId,
5552
required super.builder,
5653
super.errorBuilder,
54+
super.onReset,
5755
required this.name,
5856
this.valueTransformer,
5957
this.onChanged,
60-
this.onReset,
6158
this.focusNode,
6259
});
6360

@@ -228,7 +225,6 @@ class FormBuilderFieldState<F extends FormBuilderField<T>, T>
228225
if (_customErrorText != null) {
229226
setState(() => _customErrorText = null);
230227
}
231-
widget.onReset?.call();
232228
}
233229

234230
/// Validate field

lib/src/widgets/grouped_checkbox.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ class GroupedCheckbox<T> extends StatelessWidget {
325325
],
326326
);
327327

328-
if (this.itemDecoration != null) {
328+
if (itemDecoration != null) {
329329
compositeItem = Container(
330-
decoration: this.itemDecoration,
330+
decoration: itemDecoration,
331331
margin: EdgeInsets.only(
332332
bottom: orientation == OptionsOrientation.vertical
333333
? wrapSpacing

0 commit comments

Comments
 (0)