I have two streams fetching from two different api.
Stream<Month> get monthOutStream => monthOutController.stream;
Stream<MySchedule> get resultOutStream => resultController.stream;
I am fetching these data at two different state of the application, result at the begining and Months after some events from user.
MyScheduleBloc(){
initialData();
}
Future initialData() async {
MySchedule mySchedule = await myScheduleViewModel.importMySchedule(now.id);
resultController.add(mySchedule);
}
My screen has a streambuilder as
Widget build(BuildContext context) {
final webCalenderBloc = WebCalenderBloc();
return StreamBuilder(
stream: webCalenderBloc.resultOutStream,
builder: (BuildContext context , snapdata){
if(!snapdata.hasData){
return Center(
child: CircularProgressIndicator(),
);
}
return body(snapdata.data);
},
);
}
Since the main widget build method took the StreamBuilder Widget with resultoutstream as a stream.Where do i fetch the other stream monthoutStream. Can i fetch stream inside a stream? Do i missing anything while handling two stream.I dont want to build any widget from monthoutstream but want to check the data inside it.