-
-
Save TechieBlossom/0376ff660a9fa6eca0e2640177f2c480 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//1 | |
if (event is CarouselLoadEvent) { | |
//2 | |
final moviesEither = await getTrending(NoParams()); | |
//3 | |
yield moviesEither.fold( | |
//4 | |
(l) => MovieCarouselError(), | |
//5 | |
(movies) { | |
return MovieCarouselLoaded( | |
movies: movies, | |
defaultIndex: event.defaultIndex, | |
); | |
}, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment