So I had flutter linter add constant into PlutoGrid widget's rows property. This is because I want to first show loading and my data is populated only after a future is called.
Since the addition of const,
ref.read(tableToolsProvider.notifier).stateManager.refRows.addAll(List.from(data));
kept showing error that was not shown before. Turns out that I had accidentally added const on rows
PlutoGrid(
mode: PlutoGridMode.popup,
onSelected: (event) { },
configuration: plutoConfiguration(ref),
onLoaded: (event) {
ref.read(tableToolsProvider.notifier).setStateManager(event.stateManager);
ref.read(tableToolsProvider.notifier).stateManager.setShowLoading(true);
ref.read(tableToolsProvider.notifier).stateManager.setShowColumnFilter(true);
// stateManager.setAutoEditing(false);
},
columns: columns(ref),
// do not put const, else future values from addres using stateManager refRows will not work since rows are constant
rows: [],
),
So I had flutter linter add constant into PlutoGrid widget's rows property. This is because I want to first show loading and my data is populated only after a future is called.
Since the addition of const,
ref.read(tableToolsProvider.notifier).stateManager.refRows.addAll(List.from(data));
kept showing error that was not shown before. Turns out that I had accidentally added const on rows