Skip to content

Commit 1a22223

Browse files
author
Franco Bugnano
committed
Removed unnecessary ternary operator
1 parent 922b0c3 commit 1a22223

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/src/predicate.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ class FieldPredicate<T> {
88
List<String?>? _values;
99
bool _useValue;
1010

11-
FieldPredicate.equals(T value) : _operand = '==', _value = (value != null ? value.toString() : null), _useValue = true;
12-
FieldPredicate.notEquals(T value) : _operand = '!=', _value = (value != null ? value.toString() : null), _useValue = true;
13-
FieldPredicate.oneOf(List<T> values) : _operand = 'oneOf', _values = values.map((value) => (value != null ? value.toString() : null)).toList(), _useValue = false;
14-
FieldPredicate.notOneOf(List<T> values) : _operand = '!oneOf', _values = values.map((value) => (value != null ? value.toString() : null)).toList(), _useValue = false;
11+
FieldPredicate.equals(T value) : _operand = '==', _value = value?.toString(), _useValue = true;
12+
FieldPredicate.notEquals(T value) : _operand = '!=', _value = value?.toString(), _useValue = true;
13+
FieldPredicate.oneOf(List<T> values) : _operand = 'oneOf', _values = values.map((value) => value?.toString()).toList(), _useValue = false;
14+
FieldPredicate.notOneOf(List<T> values) : _operand = '!oneOf', _values = values.map((value) => value?.toString()).toList(), _useValue = false;
1515

1616
FieldPredicate.of(FieldPredicate<T> other)
1717
: _operand = other._operand,

0 commit comments

Comments
 (0)