DaviModel<DATA> class
The Davi model.
The type DATA
represents the data of each row.
- Inheritance
-
- Object
- ChangeNotifier
- DaviModel
Constructors
-
DaviModel({List<
DATA> rows = const [], List<DaviColumn< columns = const [], bool ignoreDataComparators = false, bool alwaysSorted = false, bool multiSortEnabled = false, OnSortCallback<DATA> >DATA> ? onSort})
Properties
- alwaysSorted → bool
-
Defines if there will always be some sorted column.
final
-
columnInResizing
↔ DaviColumn<
DATA> ? -
getter/setter pair
- columnsLength → int
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- ignoreDataComparators → bool
-
Ignore column
dataComparator
to maintain the natural order of the data.final - isColumnsEmpty → bool
-
no setter
- isColumnsNotEmpty → bool
-
no setter
- isMultiSorted → bool
-
Indicates whether the model is sorted by multiple columns.
no setter
- isOriginalRowsEmpty → bool
-
no setter
- isOriginalRowsNotEmpty → bool
-
no setter
- isRowsEmpty → bool
-
no setter
- isRowsNotEmpty → bool
-
no setter
- isSorted → bool
-
Indicates whether the model is sorted.
no setter
- multiSortEnabled → bool
-
final
-
onSort
↔ OnSortCallback<
DATA> ? -
The event that will be triggered at each sorting.
getter/setter pair
- originalRowsLength → int
-
no setter
- rowsLength → int
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sortedColumns
→ List<
DaviColumn< DATA> > -
Gets the sorted columns.
no setter
-
sortList
→ List<
DaviSort> -
The list of sorts. The list is sorted by priority.
no setter
Methods
-
addColumn(
DaviColumn< DATA> column) → void -
addColumns(
Iterable< DaviColumn< columns) → voidDATA> > -
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
addRow(
DATA row) → void -
addRows(
Iterable< DATA> rows) → void -
clearSort(
) → void - Revert to original sort order
-
columnAt(
int index) → DaviColumn< DATA> -
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
getColumn(
dynamic id) → DaviColumn< DATA> ? -
Gets a column given an
id
. Ifid
isNULL
, no columns are returned. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
notifyUpdate(
) → void - Notifies any data update by calling all the registered listeners.
-
removeColumn(
DaviColumn< DATA> column) → void -
removeColumnAt(
int index) → void -
removeColumns(
) → void - Remove all columns.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
removeRow(
DATA row) → void -
removeRowAt(
int index) → void -
removeRows(
) → void - Remove all rows.
-
replaceRows(
Iterable< DATA> rows) → void -
rowAt(
int index) → DATA -
sort(
List< DaviSort> newSortList) → void - Defines the columns that will be used in sorting.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited