casvanluijtelaar / paged_vertical_calendar

A simple paginated framework for implementing calendar based interfaces.
Apache License 2.0
39 stars 33 forks source link

if endDate is set, only the first month is shown #4

Closed jackthebeast closed 3 years ago

jackthebeast commented 3 years ago

Hi, I was trying out the plugin and when I added endDate, only the first month is shown:

return PagedVerticalCalendar(
      endDate: DateTime.now().add(Duration(days: 40)),
      dayBuilder: (context, date) {
        final color = Colors.green;

        return Container(
          color: color,
          child: Center(
            child: Text(DateFormat('d').format(date)),
          ),
        );
      },
    );

immagine

Am I missing something?

westracer commented 3 years ago

You can fix it by specifying any onPaginationCompleted callback. Though it's marked as nullable, it causes a "Null check operator used on a null value" error.

casvanluijtelaar commented 3 years ago

seems like I missed this in the automatic migration, looks like it will be fixed by https://github.com/casvanluijtelaar/paged_vertical_calendar/pull/6. I'll let you know once an update is pushed

casvanluijtelaar commented 3 years ago

go ahead and update to 1.0.3 and look if the issue persists