awaitMealsOverviewDailyReadiness method

Future<void> awaitMealsOverviewDailyReadiness()

Waits until the Meals Overview Daily Screen is ready before proceeding.

This method continuously checks the isMealsOverViewDailyScreenReady flag. If the screen is not yet ready, it waits for 50 milliseconds before checking again. The method uses recursion to keep checking until the screen becomes ready.

Returns a Future that completes when the screen is ready.

Implementation

Future<void> awaitMealsOverviewDailyReadiness() async {
  if (!isMealsOverViewDailyScreenReady) {
    // Wait for 50 milliseconds and then recursively check again.
    await Future.delayed(const Duration(milliseconds: 50));
    return await awaitMealsOverviewDailyReadiness();
  }
}