loadingBuilder property

Widget Function(BuildContext context, Widget child) loadingBuilder
final

Builds the loading widget.

Defaults to a CircularProgressIndicator, which can either be wrapped by passing child into another widget, or overridden by ignoring child.

Example:

// Wrapping the circular progress indicator in a [Container]
AsyncValueWidget(
  value: myAsyncValue,
  loadingBuilder: (context, child) => Container(child: child),
);

// Creating a custom loading widget
AsyncValueWidget(
  value: myAsyncValue,
  loadingBuilder: (context, _) => Text('Loading...'),
);

Implementation

final Widget Function(
  BuildContext context,
  Widget child,
) loadingBuilder;