build method

StreamBuilder<T> build(
  1. Widget builder(
    1. T
    ), {
  2. Widget? loading,
})

Implementation

StreamBuilder<T> build(Widget Function(T) builder, {Widget? loading}) =>
    StreamBuilder<T>(
      stream: this,
      builder: (context, snap) => snap.hasData
          ? builder(snap.data!)
          : loading ?? const SizedBox.shrink(),
    );