I have a few observables. And I need to know which one triggered the subscribe.
Observable.combineLatest(
this.tournamentsService.getUpcoming(),
I am using RxJava in Flutter and I want to combine 12 different observables using the operator combineLatest.
I saw a function prototype that takes a list of observables and an implementation. but I am not sure how to do this, I am having trouble implementing the call method. Please check my code and do the needful.
Stream> get cities => _citiesController.stream;
Stream get city => _cityController.stream;
Stream get agentcity => _agentcityController.stream;
Stream get userpackages => _packagesController.stream;
Stream get email => _emailController.stream.transform(validateEmail);
Stream get firstName => _firstNameController.stream.transform(validateFirstName);
Stream get lastName => _lastNameController.stream.transform(validateLastName);
Stream get mobileNumber => _mobileNumberController.stream.transform(validateMobile);
Stream get dob => _dobController.stream.transform(validatedob);
Stream get appointmentdate => _appointmentdateController.stream.transform(validateappointmentDate);
Stream get pincode => _pincodeController.stream.transform(validatePincode);
Stream get gender => _genderController.stream;
Stream get address => _addressController.stream.transform(validateAddress);
Stream get agentname => _agentnameController.stream.transform(validateAgentName);
Stream get validSubmission => Observable.combineLatest9(
email,
firstName,
mobileNumber,
pincode,
dob,
address,
agentname,
_genderController.stream,
_cityController.stream,
_agentcityController.stream,
_packagesController.stream,
_appointmentdateController.stream,
(e, f, m, p, d, a, an, g, c, ac, pc, ad) => true,
);
Please let me know how to use combineLatest in my Flutter code.