8
votes

I am facing the same issue with this

     Error: 
        The argument type 'Null Function(DateTime, List<dynamic>)' can't be assigned 
        to the parameter type 'void Function(DateTime, List<dynamic>, List<dynamic>)'.
        - 'DateTime' is from 'dart:core'. - 'List' is from 'dart:core'. 
        onDaySelected: (day, events) {
3
I passed _ as the third argument and it worked perfectly! - Hamza Tahir
Please convert your comment into reply and mark as answer. - Krzysztof Madej

3 Answers

10
votes

That is one way how to avoid the error

onDaySelected: (date, event, _) {
    print(date.toIso8601String());
},
5
votes

yeah I was also having the same issue it just got solved by putting ' _ ' in the third argument

onDaySelected: (date, events, _) {
        _onDaySelected(date, events);
        _animationController.forward(from: 0.0);
      },
4
votes

I am having the same problem. I managed to solve it by passing _ as the third argument.