rickypid / flutter_expandable_table

A Flutter widget for create an expandable table with header and first column fixed.
https://pub.dev/packages/flutter_expandable_table
BSD 3-Clause "New" or "Revised" License
38 stars 28 forks source link

Try to run the example, but got RangeError (index): Index out of range: no indices are valid: 0 #12

Closed jackywongboy closed 1 year ago

jackywongboy commented 1 year ago

` Performing hot restart... 1,805ms Restarted application in 1,807ms.
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ The following IndexError was thrown building ExpandableTableBody(dirty, dependencies:
[_ExpandableTableDataInherited], state: _ExpandableTableBodyState#e9e22):
RangeError (index): Index out of range: no indices are valid: 0

The relevant error-causing widget was:
ExpandableTableBody
ExpandableTableBody:file:///C:/Users/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_expandable_table-1.1.1/lib/src/expandable_table.dart:249:20

When the exception was thrown, this was the stack: C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddcruntime/errors.dart 266:49 throw C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/js_array.dart 581:7 _get] packages/flutter_expandable_table/src/body.dart 102:45 [_buildBodyColumns]

`

I copy and paste it in one of my GetView page, and it fire up this error message. The table is able to show but not able to do anything such as expand or scroll horizontally. I am using : Dart SDK version: 2.19.2 (stable) (Tue Feb 7 18:37:17 2023 +0000) on "windows_x64" Flutter 3.7.3 • channel stable • https://github.com/flutter/flutter.git Framework • revision 9944297138 (4 weeks ago) • 2023-02-08 15:46:04 -0800 Engine • revision 248290d6d5 Tools • Dart 2.19.2 • DevTools 2.20.1

rickypid commented 1 year ago

hi @jackywongboy,

Look here https://github.com/rickypid/flutter_expandable_table/issues/11#issuecomment-1546608834