-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added the ability to add a custom loading indicator #102
base: master
Are you sure you want to change the base?
Added the ability to add a custom loading indicator #102
Conversation
Thank you, that was required! |
approval/review from who ? |
Thank you for the feature, it is really required. |
To fix the file changes i created: #108 |
# Conflicts: # demo/lib/main.dart # demo/lib/screen/home_screen.dart # demo/pubspec.yaml # lib/src/pluto_grid.dart # lib/src/ui/columns/pluto_column_filter.dart
@doonfrs I can't fix this anymore. You can change this toggle so you dont see any white space changes. This can help for you This happens if someone saves a file on a machine that has it's end of line seperator set to eather LF or CRLF If someone saves a file with CRLF and i save the file again with possibly LF all those line endings are changes, and git thinks all the files are changed. with the whitespace settings you can disable the checking of those end of line seperator's and see the actual code that changed. In vscode a fixed one can be changed. I will set the fixed end of line seperator to LF in this PR => #122 Coud you re look at this PR. and possible merge it. |
# Conflicts: # .vscode/settings.json
Fix: #92
How to Use
setCustomLoadingIndicator
in PlutoGridThe
setCustomLoadingIndicator
method allows you to define a custom widget to display as the loading indicator in a PlutoGrid. Below is an explanation based on the provided example.Step-by-Step Usage
1. Define a Custom Loading Indicator
Create a custom widget that represents your loading indicator. This widget will be shown when the grid is in a loading state.
In the provided code, the
CustomIndicator
widget does the following:2. Set the Custom Loading Indicator
In the
onLoaded
callback of the PlutoGrid, use thesetCustomLoadingIndicator
method to set your custom widget:3. Toggle the Loading Indicator
You can programmatically control the visibility of the loading indicator using
stateManager?.setShowLoading
.In the provided code:
FloatingActionButton
toggles the visibility of the loading indicator.PlutoGridLoadingLevel.custom
is used to specify the loading level.Full Flow
CustomIndicator
) appears.Key Points
setShowLoading
andsetLoadingLevel
to toggle and scope the loading states.