CyberListView class

Inheritance

Constructors

CyberListView({Key? key, CyberDataTable? dataSource, FutureDataCallback? onLoadData, required ItemBuilder itemBuilder, bool isClickToScreen = false, ItemTapCallback? onItemTap, ItemLongPressCallback? onItemLongPress, CyberDataTable? menuDataTable, bool isMenuClickToScreen = false, MenuItemTapCallback? onMenuItemTap, CyberDataTable? dtSwipeActions, bool isSwipeActionClickToScreen = false, SwipeActionCallback? onSwipeActionTap, CyberDataTable? dtToolbarActions, bool isToolbarActionClickToScreen = false, ToolbarActionCallback? onToolbarActionTap, int pageSize = 20, bool showSearchBox = false, Widget? emptyWidget, Widget? loadingWidget, Widget? separator, EdgeInsets? padding, ScrollController? scrollController, int searchDebounceTime = 500, int columnCount = 1, double crossAxisSpacing = 8.0, double mainAxisSpacing = 8.0, double childAspectRatio = 1.0, bool horizontal = false, bool autoItemHeight = false, dynamic height, List<String>? columnsFilter})
const

Properties

autoItemHeight bool
Tự động điều chỉnh chiều cao item theo nội dung (chỉ dùng khi columnCount > 1 và horizontal = false)
final
childAspectRatio double
Tỷ lệ width/height của item (chỉ dùng khi columnCount > 1 và autoItemHeight = false)
final
columnCount int
Số cột hiển thị (1 = ListView, >1 = GridView) - Không có hiệu lực khi horizontal = true
final
columnsFilter List<String>?
Danh sách tên cột để tìm kiếm (chỉ dùng khi không có onLoadData) Khi có onLoadData, tìm kiếm sẽ gọi hàm onLoadData Khi không có onLoadData, tìm kiếm sẽ filter local data theo các cột này
final
crossAxisSpacing double
Khoảng cách ngang giữa các cột (chỉ dùng khi columnCount > 1)
final
dataSource CyberDataTable?
final
dtSwipeActions CyberDataTable?
Swipe actions data (CyberDataTable)
final
dtToolbarActions CyberDataTable?
Toolbar actions data (CyberDataTable) - Hiển thị bên cạnh search box
final
emptyWidget Widget?
Placeholder khi không có dữ liệu
final
hashCode int
The hash code for this object.
no setterinherited
height → dynamic
Chiều cao của ListView - Có thể là double hoặc "*" để tự động theo nội dung
final
horizontal bool
Cuộn theo chiều ngang (horizontal = true thì columnCount không có hiệu lực)
final
isClickToScreen bool
Tự động navigate đến màn hình khi click vào item
final
isMenuClickToScreen bool
Tự động navigate đến màn hình khi tap menu item
final
isSwipeActionClickToScreen bool
Tự động navigate đến màn hình khi tap swipe action
final
isToolbarActionClickToScreen bool
Tự động navigate đến màn hình khi tap toolbar action
final
itemBuilder ItemBuilder
Builder để tùy chỉnh giao diện row
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadingWidget Widget?
Loading indicator
final
mainAxisSpacing double
Khoảng cách dọc giữa các hàng (chỉ dùng khi columnCount > 1)
final
Menu data (CyberDataTable) - Hiển thị khi long press
final
onItemLongPress ItemLongPressCallback?
Callback khi long press item
final
onItemTap ItemLongPressCallback?
Callback khi tap vào item
final
onLoadData FutureDataCallback?
Hàm load dữ liệu - Dùng cho load đầu, load more, refresh, search
final
onMenuItemTap MenuItemTapCallback?
Callback khi tap vào menu item
final
onSwipeActionTap MenuItemTapCallback?
Callback khi tap vào swipe action
final
onToolbarActionTap ToolbarActionCallback?
Callback khi tap vào toolbar action
final
padding EdgeInsets?
Padding cho ListView/GridView
final
pageSize int
Page size cho load more
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
ScrollController tùy chỉnh
final
searchDebounceTime int
Debounce time cho search (milliseconds)
final
separator Widget?
Separator giữa các item (chỉ dùng khi columnCount = 1)
final
showSearchBox bool
Có hiển thị search box không
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<CyberListView>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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