I've tried in many ways to make the layout user friendly. now I'm having issue with
PaginateDatatable is not scrolling horizontally and causes overflow to be hidden like in image.
Note: I'm trying to scroll rows
area without scrolling Rows per page: ..
area.
My Code:
CustomScrollView(
scrollBehavior: MyCustomScrollBehavior(),
slivers: [
SliverAppBar(
title: Text("title"),
actions: [
Padding(
child: Row(
children: [
ElevatedButton(
onPressed: () {
onAddNewPressed();
},
child: Row(children: const [
Text("Add new"),
Icon(Icons.add),
]),
),
],
),
),
],
pinned: true,
),
SliverToBoxAdapter(
child: PaginatedDataTable(
columns: cols,
source: DTS(rows),
...
),
),
],
)
CustomScrollBehavior class:
class CustomScrollBehavior extends MaterialScrollBehavior { // A custom scroll behavior allows setting whichever input device types that we want, and in this case, we want mouse and touch support.
@override
Set<PointerDeviceKind> get dragDevices => {
PointerDeviceKind.mouse,
PointerDeviceKind.touch,
};
}
I've tried alot of answers on stackoverflow but still not solving in my case.