NiceFilter<T> class

A filter applied to the rows of a table, keyed by a column id (or any string for filters that are not tied to a column).

Filters are evaluated client-side by NiceTableController.process, and are also part of NiceQuery so a server-side source can translate them.

Constructors

NiceFilter({required String label, required bool predicate(T row), Object? value})
Creates a filter with a predicate and a human readable label.
const
NiceFilter.contains({required String text, required Object? valueOf(T row), String? label})
Keeps rows whose column text contains text (case-insensitive).
factory
NiceFilter.equals({required Object? value, required Object? valueOf(T row), String? label})
Keeps rows whose column value equals value.
factory
NiceFilter.oneOf({required Iterable<Object?> values, required Object? valueOf(T row), String? label})
Keeps rows whose column value is one of values.
factory
NiceFilter.range({required Comparable<Object?>? min, required Comparable<Object?>? max, required Object? valueOf(T row), String? label})
Keeps rows whose comparable column value lies in [min, max].
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
label → String
Chip label shown in the toolbar.
final
predicate → bool Function(T row)
Returns true for rows that should stay visible.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → Object?
Optional raw value, handy for server-side sources that translate filters into query parameters.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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