2

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()),
);
deczaloth
  • 7,094
  • 4
  • 24
  • 59
Kyaw Thiha
  • 23
  • 2

2 Answers2

2

Well try to remove the controller then ? controller: ScrollController()

Dwi Kurnianto M
  • 427
  • 3
  • 6
0

Just remove the controller: ScrollController(), line or comment it out. and the exception should be cleared. That is how I fixed mine.

wilhit
  • 36
  • 5
  • 1
    Your answer appear to be a duplicate of another answer. Please review any previous answers before answering a question on the site to be sure that you are not needlessly repeating information. – ouflak Jan 19 '22 at 12:25