buildNullable method
Widget
buildNullable({
- WidgetDataBuilder<
T?> ? builder, - bool isSliver = false,
- WidgetBuilder? loadingBuilder,
- SimpleWidgetBuilder? simpleLoader,
- T? initial,
- bool? crossFade,
- Key? key,
Implementation
Widget buildNullable(
{WidgetDataBuilder<T?>? builder,
bool isSliver = false,
WidgetBuilder? loadingBuilder,
SimpleWidgetBuilder? simpleLoader,
T? initial,
bool? crossFade,
Key? key}) {
return StreamBuilder<T>(
key: key,
stream: this,
builder: (context, snap) {
return snap.render(
context,
isSliver: isSliver,
crossFade: crossFade,
builder: (data, _) => builder!(data),
loadingFn: simpleLoader ??
(loadingBuilder == null
? kLoader
: () => loadingBuilder(context)),
allowNull: true,
);
},
initialData: initial,
);
}