@@ -28,28 +28,28 @@ class RangeValidator<T> extends TranslatedValidator<T> {
28
28
29
29
/// {@macro base_validator_null_check}
30
30
super .checkNullOrEmpty,
31
- }) : _minValidator = MinValidator <T >(
32
- min,
33
- inclusive: inclusive,
34
- errorText: errorText,
35
- checkNullOrEmpty: checkNullOrEmpty,
36
- ),
37
- _maxValidator = MaxValidator <T >(
38
- max,
39
- inclusive: inclusive,
40
- errorText: errorText,
41
- checkNullOrEmpty: checkNullOrEmpty,
42
- ),
43
- _minLengthValidator = MinLengthValidator <T >(
44
- min.toInt (),
45
- errorText: errorText,
46
- checkNullOrEmpty: checkNullOrEmpty,
47
- ),
48
- _maxLengthValidator = MaxLengthValidator <T >(
49
- max.toInt (),
50
- errorText: errorText,
51
- checkNullOrEmpty: checkNullOrEmpty,
52
- );
31
+ }) : _minValidator = MinValidator <T >(
32
+ min,
33
+ inclusive: inclusive,
34
+ errorText: errorText,
35
+ checkNullOrEmpty: checkNullOrEmpty,
36
+ ),
37
+ _maxValidator = MaxValidator <T >(
38
+ max,
39
+ inclusive: inclusive,
40
+ errorText: errorText,
41
+ checkNullOrEmpty: checkNullOrEmpty,
42
+ ),
43
+ _minLengthValidator = MinLengthValidator <T >(
44
+ min.toInt (),
45
+ errorText: errorText,
46
+ checkNullOrEmpty: checkNullOrEmpty,
47
+ ),
48
+ _maxLengthValidator = MaxLengthValidator <T >(
49
+ max.toInt (),
50
+ errorText: errorText,
51
+ checkNullOrEmpty: checkNullOrEmpty,
52
+ );
53
53
54
54
/// The minimum value of the range.
55
55
final num min;
@@ -80,10 +80,12 @@ class RangeValidator<T> extends TranslatedValidator<T> {
80
80
String ? validateValue (T valueCandidate) {
81
81
final String ? minResult = _minValidator.validate (valueCandidate);
82
82
final String ? maxResult = _maxValidator.validate (valueCandidate);
83
- final String ? minLengthResult =
84
- _minLengthValidator.validate (valueCandidate);
85
- final String ? maxLengthResult =
86
- _maxLengthValidator.validate (valueCandidate);
83
+ final String ? minLengthResult = _minLengthValidator.validate (
84
+ valueCandidate,
85
+ );
86
+ final String ? maxLengthResult = _maxLengthValidator.validate (
87
+ valueCandidate,
88
+ );
87
89
88
90
if ((minResult == null && maxResult == null ) ||
89
91
(minLengthResult == null && maxLengthResult == null )) {
0 commit comments