Replacing State Views
Each state view property accepts aWidgetBuilder — a function that takes BuildContext and returns a Widget.
| Property | State |
|---|---|
emptyStateView | No data to display |
errorStateView | An error occurred during data fetching |
loadingStateView | Data is being fetched |
emptyChatGreetingView | Empty chat with a greeting (message list only) |
Example: Custom Empty State
- Dart
Example: Custom Error State
- Dart
Example: Custom Loading State
- Dart
Example: Empty Chat Greeting
The message list supports a specialemptyChatGreetingView for new conversations:
- Dart
Lifecycle Callbacks
Use lifecycle callbacks to run custom logic when states change:- Dart
Related
- Customization Overview — See all customization categories.