UAsyncBuilder<T> constructor

const UAsyncBuilder<T>({
  1. required Future<T> load(),
  2. required Widget builder(
    1. BuildContext context,
    2. T data
    ),
  3. Key? key,
  4. Widget? loading,
  5. Widget error(
    1. BuildContext context,
    2. Object error,
    3. VoidCallback retry
    )?,
  6. Widget? empty,
  7. bool isEmpty(
    1. T data
    )?,
  8. bool pullToRefresh = false,
})

load runs on start and on retry/refresh; isEmpty decides when to show empty.

Implementation

const UAsyncBuilder({
  required this.load,
  required this.builder,
  super.key,
  this.loading,
  this.error,
  this.empty,
  this.isEmpty,
  this.pullToRefresh = false,
});