feat: no-data view support added. #53
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Title: Implement "No Data" Handling and View in PagedDataTable Widget
Description
Problem:
Previously, the table widget did not have a clear way to handle situations where no data was available to display. This could lead to an empty or confusing UI for the user.
Solution:
This pull request introduces robust support for "no data" scenarios in the PagedDataTable widget by:
noDataViewWidget Parameter:noDataViewto the PagedDataTable widget.SizedBox.shrink().if (tableController._state == _TableState.noData && tableController._currentDataset.isEmpty).noDataViewwidget (if provided) instead of the empty table._TableState.noDataState:_TableState.noData, to the_TableStateenum._TableState.noDatastate. This ensures that the UI updates appropriately.notifyListenersmethod was called in the correct place.Impact:
Files Changed:
controller.dart: Modified to add the new state, the conditional check, and trigger the notification.paged_datatable.dart: (If present) Added thenoDataViewparameter to theTablewidget and conditional check.How to Test:
noDataViewwidget (if provided) is displayed in the table area.noDataView, ensure that an empty space is displayed.