FitGridColumnFilter class

One column's filter, as data.

Deliberately a value rather than a closure: it can be shown back to the user in the filter panel, saved with the rest of the grid's state, and sent to a server as JSON — none of which a bool Function(T) can do.

Annotations

Constructors

FitGridColumnFilter({required FitGridFilterOperator operator, Object? value, Object? value2, Set<String> values = const <String>{}})
const
FitGridColumnFilter.fromJson(Map<String, Object?> json)
factory
FitGridColumnFilter.oneOf(Set<String> values)
A checklist filter: the cell's text must be one of values.
const

Properties

hashCode → int
The hash code for this object.
no setteroverride
operator → FitGridFilterOperator
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → Object?
The operand: a String, a num or a DateTime, by the column's kind.
final
value2 → Object?
The upper bound of FitGridFilterOperator.between.
final
values → Set<String>
The accepted values of FitGridFilterOperator.inList.
final

Methods

matches(String text, Object? typed) → bool
Tests a cell. text is the column's text for the row; typed is the value its filter spec extracts, for number and date columns.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
A JSON-friendly map. Numbers stay numbers; a date becomes {"date": "<ISO-8601>"}, so it cannot be mistaken for a string operand on the way back in.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override