Skip to content

Commit 64ca9b8

Browse files
fix: update lints
1 parent 6a69d46 commit 64ca9b8

File tree

4 files changed

+37
-40
lines changed

4 files changed

+37
-40
lines changed

lib/src/fields/form_builder_choice_chips.dart

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ class FormBuilderChoiceChip<T> extends FormBuilderFieldDecoration<T> {
5757
/// shape resolves to null, the default is [StadiumBorder].
5858
///
5959
/// This shape is combined with [side] to create a shape decorated with an
60-
/// outline. If it is a [MaterialStateOutlinedBorder],
61-
/// [MaterialStateProperty.resolve] is used for the following
62-
/// [MaterialState]s:
63-
///
64-
/// * [MaterialState.disabled].
65-
/// * [MaterialState.selected].
66-
/// * [MaterialState.hovered].
67-
/// * [MaterialState.focused].
68-
/// * [MaterialState.pressed].
60+
/// outline. If it is a [WidgetStateOutlinedBorder],
61+
/// [WidgetStateProperty.resolve] is used for the following
62+
/// [WidgetState]s:
63+
///
64+
/// * [WidgetState.disabled].
65+
/// * [WidgetState.selected].
66+
/// * [WidgetState.hovered].
67+
/// * [WidgetState.focused].
68+
/// * [WidgetState.pressed].
6969
final OutlinedBorder? shape;
7070

7171
/// Configures the minimum size of the tap target.
@@ -90,14 +90,14 @@ class FormBuilderChoiceChip<T> extends FormBuilderFieldDecoration<T> {
9090
/// This only has an effect on widgets that respect the [DefaultTextStyle],
9191
/// such as [Text].
9292
///
93-
/// If [labelStyle.color] is a [MaterialStateProperty<Color>], [MaterialStateProperty.resolve]
94-
/// is used for the following [MaterialState]s:
93+
/// If [labelStyle.color] is a [MaterialStateProperty<Color>], [WidgetStateProperty.resolve]
94+
/// is used for the following [WidgetState]s:
9595
///
96-
/// * [MaterialState.disabled].
97-
/// * [MaterialState.selected].
98-
/// * [MaterialState.hovered].
99-
/// * [MaterialState.focused].
100-
/// * [MaterialState.pressed].
96+
/// * [WidgetState.disabled].
97+
/// * [WidgetState.selected].
98+
/// * [WidgetState.hovered].
99+
/// * [WidgetState.focused].
100+
/// * [WidgetState.pressed].
101101
final TextStyle? labelStyle;
102102

103103
/// The padding between the contents of the chip and the outside [shape].

lib/src/fields/form_builder_date_time_picker.dart

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ class _FormBuilderDateTimePickerState extends FormBuilderFieldDecorationState<
272272
Future<void> _handleFocus() async {
273273
if (effectiveFocusNode.hasFocus && enabled) {
274274
effectiveFocusNode.unfocus();
275-
await onShowPicker(context, value);
275+
await onShowPicker(value);
276276
}
277277
}
278278

@@ -289,24 +289,23 @@ class _FormBuilderDateTimePickerState extends FormBuilderFieldDecorationState<
289289
}
290290
}
291291

292-
Future<DateTime?> onShowPicker(
293-
BuildContext context, DateTime? currentValue) async {
292+
Future<DateTime?> onShowPicker(DateTime? currentValue) async {
294293
currentValue = value;
295294
DateTime? newValue;
296295
switch (widget.inputType) {
297296
case InputType.date:
298-
newValue = await _showDatePicker(context, currentValue);
297+
newValue = await _showDatePicker(currentValue);
299298
break;
300299
case InputType.time:
301-
if (!context.mounted) return null;
302-
newValue = convert(await _showTimePicker(context, currentValue));
300+
if (!context.mounted) break;
301+
newValue = convert(await _showTimePicker(currentValue));
303302
break;
304303
case InputType.both:
305-
if (!context.mounted) return null;
306-
final date = await _showDatePicker(context, currentValue);
304+
if (!context.mounted) break;
305+
final date = await _showDatePicker(currentValue);
307306
if (date != null) {
308307
if (!mounted) break;
309-
final time = await _showTimePicker(context, currentValue);
308+
final time = await _showTimePicker(currentValue);
310309
newValue = combine(date, time);
311310
}
312311
break;
@@ -319,8 +318,7 @@ class _FormBuilderDateTimePickerState extends FormBuilderFieldDecorationState<
319318
return finalValue;
320319
}
321320

322-
Future<DateTime?> _showDatePicker(
323-
BuildContext context, DateTime? currentValue) {
321+
Future<DateTime?> _showDatePicker(DateTime? currentValue) {
324322
return showDatePicker(
325323
context: context,
326324
selectableDayPredicate: widget.selectableDayPredicate,
@@ -347,8 +345,7 @@ class _FormBuilderDateTimePickerState extends FormBuilderFieldDecorationState<
347345
);
348346
}
349347

350-
Future<TimeOfDay?> _showTimePicker(
351-
BuildContext context, DateTime? currentValue) async {
348+
Future<TimeOfDay?> _showTimePicker(DateTime? currentValue) async {
352349
var builder = widget.transitionBuilder;
353350
if (widget.locale != null) {
354351
builder = (context, child) {

lib/src/fields/form_builder_slider.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ class FormBuilderSlider extends FormBuilderFieldDecoration<double> {
100100
/// widget.
101101
///
102102
/// If [mouseCursor] is a [MaterialStateProperty<MouseCursor>],
103-
/// [MaterialStateProperty.resolve] is used for the following [MaterialState]s:
103+
/// [WidgetStateProperty.resolve] is used for the following [WidgetState]s:
104104
///
105-
/// * [MaterialState.hovered].
106-
/// * [MaterialState.focused].
107-
/// * [MaterialState.disabled].
105+
/// * [WidgetState.hovered].
106+
/// * [WidgetState.focused].
107+
/// * [WidgetState.disabled].
108108
///
109-
/// If this property is null, [MaterialStateMouseCursor.clickable] will be used.
109+
/// If this property is null, [WidgetStateMouseCursor.clickable] will be used.
110110
final MouseCursor? mouseCursor;
111111

112112
/// The callback used to create a semantic value from a slider value.

lib/src/fields/form_builder_text_field.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,14 @@ class FormBuilderTextField extends FormBuilderFieldDecoration<String> {
218218
/// widget.
219219
///
220220
/// If [mouseCursor] is a [MaterialStateProperty<MouseCursor>],
221-
/// [MaterialStateProperty.resolve] is used for the following [MaterialState]s:
221+
/// [WidgetStateProperty.resolve] is used for the following [WidgetState]s:
222222
///
223-
/// * [MaterialState.error].
224-
/// * [MaterialState.hovered].
225-
/// * [MaterialState.focused].
226-
/// * [MaterialState.disabled].
223+
/// * [WidgetState.error].
224+
/// * [WidgetState.hovered].
225+
/// * [WidgetState.focused].
226+
/// * [WidgetState.disabled].
227227
///
228-
/// If this property is null, [MaterialStateMouseCursor.textable] will be used.
228+
/// If this property is null, [WidgetStateMouseCursor.textable] will be used.
229229
///
230230
/// The [mouseCursor] is the only property of [TextField] that controls the
231231
/// appearance of the mouse pointer. All other properties related to "cursor"

0 commit comments

Comments
 (0)