rwbr / flutter_neat_and_clean_calendar

Simple and clean flutter calendar with ability to slide up/down to show weekly/monthly calendar. Forked from [flutter_clean_calender](https://pub.dev/packages/flutter_clean_calendar)
MIT License
106 stars 55 forks source link

Freezes if I think more than 20+ ? #54

Open KeithBacalso opened 1 year ago

KeithBacalso commented 1 year ago

When I debug my logic side it successfully fetches the API, but my presentation side after it successfully fetched the loading will freezed for a few seconds before it renders the UI. After it renders the UI the app is slow.

code:

Calendar(
            onDateSelected: (v) {
              setState(() {
                _selectedDate = v;
              });
            },
            isExpandable: true,
            hideTodayIcon: true,
            dayOfWeekStyle:
                AppTextStyles.reg3.copyWith(color: AppColors.capeCodBay),
            expandableDateFormat: 'EEEE, dd. MMMM yyyy',
            selectedColor: AppColors.capeCodBay,
            selectedTodayColor: AppColors.capeCodBay,

            eventsList:eventsState.getEventsStatus == Status.success? eventsState.eventsModel.events : null, // => removed this fixes the freeze issue

            eventListBuilder: (context, selectedDayEvents) {
      when I removed the `eventsList` param it fixes the freeze issue, maybe there is something to do with your logic in that param?.