SafeStreamBuilder<T> constructor

const SafeStreamBuilder<T>({
  1. required Widget builder(
    1. BuildContext context,
    2. T data,
    3. ConnectionState connectionState
    ),
  2. Stream<T>? stream,
  3. T? initialData,
  4. Widget onError(
    1. Object? error,
    2. StackTrace? stackTrace,
    3. Widget child,
    4. ConnectionState connectionState,
    )?,
  5. Widget onWait(
    1. ConnectionState connectionState,
    2. Widget child
    )?,
  6. String? waitingMessage,
  7. Key? key,
})

Implementation

const SafeStreamBuilder({
  required this.builder,
  this.stream,
  this.initialData,
  this.onError,
  this.onWait,
  this.waitingMessage,
  super.key,
}) : assert(
        onWait == null || waitingMessage == null,
        'onWait or waitingMessage must be null.',
      );