AsyncBuilder<T> constructor
const
AsyncBuilder<T> ({
- Key? key,
- WidgetBuilder? waiting,
- required ValueBuilderFn<
T> builder, - ErrorBuilderFn? error,
- ValueBuilderFn<
T> ? closed, - Future<
T> ? future, - Stream<
T> ? stream, - T? initial,
- bool retain = false,
- bool pause = false,
- bool? silent,
- bool keepAlive = false,
- ErrorReporterFn? reportError,
Implementation
const AsyncBuilder({
Key? key,
this.waiting,
required this.builder,
this.error,
this.closed,
this.future,
this.stream,
this.initial,
this.retain = false,
this.pause = false,
bool? silent,
this.keepAlive = false,
ErrorReporterFn? reportError,
}) : silent = silent ?? error != null,
reportError = reportError ?? FlutterError.reportError,
assert(!((future != null) && (stream != null)),
'AsyncBuilder should be given either a stream or future'),
assert(future == null || closed == null,
'AsyncBuilder should not be given both a future and closed builder'),
super(key: key);