Skip to content

Commit 7df3cf0

Browse files
add type annotation
1 parent 926b96f commit 7df3cf0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/new_api_prototype/generic_type_validators.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ Validator<T> isEqual<T extends Object?>(T value,
6161
Validator<T> isTrue<T extends Object>(
6262
{String? isTrueMsg, bool caseSensitive = false, bool trim = true}) {
6363
return (T value) {
64-
final (isValid, typeTransformedValue) = _isBoolValidateAndConvert(
64+
final (bool isValid, bool? typeTransformedValue) =
65+
_isBoolValidateAndConvert(
6566
value,
6667
caseSensitive: caseSensitive,
6768
trim: trim,
@@ -101,7 +102,8 @@ Validator<T> isTrue<T extends Object>(
101102
Validator<T> isFalse<T extends Object>(
102103
{String? isFalseMsg, bool caseSensitive = false, bool trim = true}) {
103104
return (T value) {
104-
final (isValid, typeTransformedValue) = _isBoolValidateAndConvert(
105+
final (bool isValid, bool? typeTransformedValue) =
106+
_isBoolValidateAndConvert(
105107
value,
106108
caseSensitive: caseSensitive,
107109
trim: trim,

0 commit comments

Comments
 (0)