'Error: The argument type 'Null Function(DateTime, List<dynamic>)' can't be assigned to the parameter

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) {


Solution 1:[1]

That is one way how to avoid the error

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

Solution 2:[2]

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);
      },

Solution 3:[3]

I managed to solve it by passing _ as the third argument.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 blckCoach
Solution 2 Spsnamta
Solution 3 General Grievance