How can I combine 2 future signals inside a computed signal #372
Answered
by
rodydavis
htetlynnhtun
asked this question in
Q&A
-
I'm new to signals. Please guide me. final $movieGenres = futureSignal(() async {
return GetIt.I.get<GenreService>(instanceName: 'movieGenreService').getAll();
});
final $countries = futureSignal(() async {
return GetIt.I.get<CountryService>().getAll();
});
final $movieGenresAndCountries = computedAsync(() async {
final genres = ...?;
final countries = ...?;
return (genres, countries);
}); |
Beta Was this translation helpful? Give feedback.
Answered by
rodydavis
Mar 5, 2025
Replies: 1 comment
-
There is a .future that you can away the value of an AsyncSignal. You can optionally do Future.wait to run the both to get the value |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
rodydavis
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is a .future that you can away the value of an AsyncSignal.
You can optionally do Future.wait to run the both to get the value