与此同时,我也面临着同样的问题
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) {
答案 0 :(得分:2)
那是避免错误的一种方法
onDaySelected: (date, event, _) {
print(date.toIso8601String());
},
答案 1 :(得分:1)
我遇到了同样的问题。我设法通过传递_作为第三个参数来解决它。
答案 2 :(得分:1)
是的,我也遇到了同样的问题,只需在第三个参数中加上'_就可以解决
onDaySelected: (date, events, _) {
_onDaySelected(date, events);
_animationController.forward(from: 0.0);
},