I want to always show the scroll bar below the datatable for the web version. But it's showing this error message:
The Scrollbar's ScrollController has no ScrollPosition attached.
and the scroll bar doesn't work.
Scrollbar(
isAlwaysShown: true,
controller: ScrollController(),
thickness: 10,
child: PaginatedDataTable(
showCheckboxColumn: false,
columns: generateColumns(),
source: generateDataSources(),
rowsPerPage: count.toInt()),
);
Well try to remove the controller then ? controller: ScrollController()
Just remove the line :
controller: ScrollController(),
and the exception should be cleared. That is how I fixed mine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.