MhItemsViewState<T> class

This class is an internal class for MhItemsView holding the current Widget State

Constructors

MhItemsViewState({required MhItemsView<T> widget, required List<T> itemsSource, List<MhItemsViewColumnDef<T>>? columnDefs, MhItemsViewSettings<T>? settings, MhItemsViewTheme? themeLight, MhItemsViewTheme? themeDark, required void setState(), String debugName = "noName"})

Properties

colInEditMode int?
getter/setter pair
colLeftCache List<double>
Cache to hold all left Positions of each column
getter/setter pair
columnDefs List<MhItemsViewColumnDef<T>>
getter/setter pair
debugName String
final
draggedVicinity ChildVicinity?
getter/setter pair
editModeIsRequestedForCol int?
getter/setter pair
editModeIsRequestedForRow int?
getter/setter pair
filteredItemsSource List<T>
final
filteredItemsSourceUnsorted List<T>
final
firstVisibleColumnIndex int
The first column visible in the viewPort
getter/setter pair
firstVisibleRowIndex int
The first row visible in the viewPort
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headerMoved double
getter/setter pair
isTreeView bool
getter/setter pair
itemsSource List<T>
final
lastVisibleColumnIndex int
The last column visible in the viewPort
getter/setter pair
lastVisibleRowIndex int
The last row visible in the viewPort
getter/setter pair
markedItem ↔ T?
getter/setter pair
rowTopCache List<double>
Cache to hold all top Positions of each row
getter/setter pair
rowWidth double
The width of all collumns = the width of a row
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedItems Map<T, T>
For fast check if item is selected or not
final
selectedItemsList List<T>
Here we keep the items in the order they appear in the list
final
selectedItemsOrderedList List<T>
Here we keep the items in the order they were selected. (Last selected item is the last item in this list)
final
setState ↔ void Function()
getter/setter pair
settings MhItemsViewSettings<T>
getter/setter pair
theme MhItemsViewTheme
getter/setter pair
themeDark MhItemsViewTheme
getter/setter pair
themeLight MhItemsViewTheme
getter/setter pair
viewportHeight double
getter/setter pair
viewportWidth double
getter/setter pair
widget MhItemsView<T>
final

Methods

addSelectedItem({required T item, bool fromSelectBox = false, bool fromEditBox = false, bool fromDragDrop = false}) → void
addSelectedItemInner(T item) → void
clearRequestEditMode() → void
clearSelectedItems() → void
editModeIsRequested(int row, int col) bool
isSelected(dynamic item) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
orderSelectedItems() → void
Keep original Order in selectedItemsList This function is relatively slow, do not use it inside a loop - call it at the end of a loop
refreshFilter() → void
removeSelectedItem(T item) → void
requestEditModeFor(T item, int row, int col, MhItemsViewMoveFocusDirections direction) bool
setMarked(T item, bool isMarked) → void
sortItems() → void
toString() String
A string representation of this object.
inherited

Operators

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

Constants

reorderColumnId → const String
selectionColumnId → const String