getLifetimeSearchedBookingValue method

String getLifetimeSearchedBookingValue()

Implementation

String getLifetimeSearchedBookingValue() {
  String bookingType = controller.getBookingType();

  return bookingType == 'all'
      ? '${(controller.bookingStats.value?.searched?.lifetime?.all ?? 0).round()}'
      : bookingType == 'eco'
          ? '${(controller.bookingStats.value?.searched?.lifetime?.economyPremium ?? 0).round()}'
          : bookingType == 'business'
              ? '${(controller.bookingStats.value?.searched?.lifetime?.firstBusiness ?? 0).round()}'
              : '0';
}