Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. mealsSubscription = MealsBloc.todayMealsStream.listen((todayMeals) {
  2. setState(() {
  3. if (todayMeals!= null && todayMeals.length>0){
  4. CircularLoadingBloc.stop();
  5. meals = todayMeals;
  6. }
  7. else{
  8. meals.clear();
  9. }
  10. });
  11. });
  12.  
  13. MediaQuery.removePadding(
  14. context: context,
  15. child: ListView.builder(
  16. physics: NeverScrollableScrollPhysics(),
  17. shrinkWrap: true,
  18. itemCount: meals.length,
  19. itemBuilder: (context, index) {
  20. return MealItem(
  21. meal: meals.elementAt(index),
  22. showButton: true,
  23. redeemed: true,
  24. showDate:false,
  25. inSubscription: true,
  26. date: MealsBloc.currentVisibleDate,
  27. );
  28. },
  29. ),
  30. removeTop: true,
  31. ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement