Flutter新手遇函数参数类型不匹配错误求助
Flutter参数类型不匹配错误求助
我是Flutter新手,正在开发一个包含3个页面的应用,目前遇到两个组件参数类型不兼容的错误:
meals.dart中的错误:
The argument type 'Void Function(BuildContext)' can't be assigned to the parameter type 'Void Function(BuildContext, Meal)'
meal_item.dart中的错误:
The argument type 'Meal' can't be assigned to the parameter type 'BuildContext'
相关材料
- VS Code项目概览截图:
VS Code项目概览 meals.dart完整代码:
// 请在此处粘贴meals.dart的完整代码
meal_item.dart完整代码:
// 请在此处粘贴meal_item.dart的完整代码
meal_item.dart错误提示截图:
meal_item.dart错误截图
内容的提问来源于stack exchange,提问作者Rezam
相关产品推荐
相关产品推荐

