bosskmk / pluto_grid

PlutoGrid is a dataGrid for flutter that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS.
https://pluto.weblaze.dev
MIT License
639 stars 293 forks source link

[Bug] Getting "PlutoCell is not initialized" error after adding rows #888

Closed Ze1enyy closed 10 months ago

Ze1enyy commented 1 year ago

Im using Firebase to save my values, so ive added bloc event for each onChanged event case. First one update of cell works good, but after this i can't hit any of cells, since im getting this error. Also im getting error 'Unsupported operation: addAll" while trying to add columns by stateManager.columns.addAll.

Steps to reproduce the bug

  1. Enter value inside any of cells
  2. Tap Enter
  3. Tap on the same cell.

Expected results

When i tap on cell - it reopens again.

Actual results

It throws an "PlutoCell is not initialized.When adding a column or row, if it is not added through PlutoGridStateManager, PlutoCell does not set the necessary information at runtime".

Code sample

 onLoaded: (PlutoGridOnLoadedEvent event) {
                  stateManager = event.stateManager;

                  print('Rows ${stateManager.rows}');
                  print('Columns ${stateManager.columns}');

                  stateManager.rows.addAll(rows);
                },

Execution Environment

Flutter version Flutter version is 3.10.2

PlutoGrid version PlutoGrid version is 7.0.2

OS Win10

github-actions[bot] commented 11 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 10 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.