FilterNumeric class final

A FilterNumeric filters on a numeric value by range (lower/upper bounds) or by comparing it with NumericOperator.

Numeric comparison

Create FilterNumeric comparing a numeric value using NumericOperator, by calling FilterNumeric.comparison constructor:

final filter = Filter.comparison('price', NumericOperator.lessOrEquals, 42);

Numeric range

Create FilterNumeric with a numeric range by calling FilterNumeric.range constructor:

final filter = Filter.range('rating', lowerBound: 3, upperBound: 5);
Implemented types

Constructors

FilterNumeric.comparison(String attribute, NumericOperator operator, num number, [bool isNegated = false])
Creates numeric value as a comparison.
factory
FilterNumeric.range(String attribute, num lowerBound, num upperBound, [bool isNegated = false])
Creates numeric value as a range.
factory

Properties

attribute String
The attribute this filter applies on.
final
hashCode int
The hash code for this object.
no setterinherited
isNegated bool
Whether or not the filter is negated.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value NumericValue
Filter numeric value.
final

Methods

copyWith({String? attribute, NumericValue? value, bool? isNegated}) FilterNumeric
Make a copy of the numeric filter.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
not() FilterNumeric
Negates a FilterFacet.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited