flexible_scrollable_table_view 2.9.1 flexible_scrollable_table_view: ^2.9.1 copied to clipboard
A table view who can scroll both vertical and horizontal.
Usage #
- 1、Init
FlexibleTableController<T>
and release indispose()
lifecycle callback functions. (Required)
late FlexibleTableController<T> controller;
@override
void initState() {
super.initState();
controller = FlexibleTableController<T>();
}
@override
void dispose() {
controller.dispose();
super.dispose();
}
- 2、Init
AbsFlexibleTableConfigurations<T>
and add some instances ofAbsFlexibleColumn<T>
. (Required)
rowHeight
is required and subclass ofAbsFlexibleTableRowHeight<T>
.
leftPinnedColumns
is optional and place columns pinned at left.
rightPinnedColumns
is optional and place columns pinned at right.
scrollableColumns
is optional and place columns in a horizontal-scrolling ListView.
AbsFlexibleTableConfigurations<T> configurations = FlexibleTableConfigurations<T>(
rowHeight: const FixedHeight(
headerRowHeight: 40,
fixedInfoRowHeight: 50,
),
leftPinnedColumns: {},
rightPinnedColumns: {},
scrollableColumns: {},
);
- 3、Init
FlexibleTableHeader<T>
widget. (Optional)
Instance ofFlexibleTableController<T>
is required.
Instance ofAbsFlexibleTableConfigurations<T>
is required.
FlexibleTableHeader<T>(
controller,
configurations: configurations,
);
- 4、Init
FlexibleTableContent<T>
widget. (Required)
FlexibleTableContent<T>(
controller,
configurations: configurations,
);
- Example project for more usage.
Example #