> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Loading

> Shows a loading indicator during pending search requests.

## About this widget

Show a loading indicator during pending requests.

## Examples

Display a loading indicator using Flutter's [`StreamBuilder`](https://api.flutter.dev/flutter/widgets/StreamBuilder-class.html).

```dart Dart icon=code theme={"system"}
class SearchHits extends StatelessWidget {
  const SearchHits(this.responses, {super.key});

  final Stream<SearchResponse> responses;

  @override
  Widget build(BuildContext context) {
    return StreamBuilder<SearchResponse>(
      stream: responses,
      builder: (context, snapshot) {
        if (snapshot.hasData) {
          // display hits list
        } else if (snapshot.hasError) {
          // display error message
        } else {
          // display loading indicator
          return const CircularProgressIndicator();
        }
      },
    );
  }
}
```
