Skip to main content
Components display state views when the list is empty, an error occurs, or data is loading. You can replace these with custom widgets.

Replacing State Views

Each state view property accepts a WidgetBuilder — a function that takes BuildContext and returns a Widget.

Example: Custom Empty State

Example: Custom Error State

Example: Custom Loading State

Example: Empty Chat Greeting

The message list supports a special emptyChatGreetingView for new conversations:

Lifecycle Callbacks

Use lifecycle callbacks to run custom logic when states change: