addObserver method

Widget addObserver(
  1. Widget ob(
    1. T t
    ), {
  2. required T initialData,
})

Implementation

Widget addObserver(Widget Function(T t) ob, {required T initialData}) {
  this.t = data ?? initialData;
  // var streamBuild = this as StreamBuild<T>;
  return StreamBuilderWidget<T>(
    streamBuild: this,
    builder: ob,
    initialData: initialData,
  );
}