我是flutter的新手,我得到了错误: error : The argument type 'Function' can't be assigned to the parameter type 'voidFunction()' 我做了一个餐饮应用。import 'package:flutter/material.dart';
import 'package:recipes/screens/fil
我已经为ElevatedButton()创建了一个StatelessWidget,当我将一个selectHandler传递给ElevatedButton()的onPressed参数时,我得到了这个错误ElevatedButtonselectHandler是一个Function类型的变量。
final Funct
_onFromChanged(value); _onToChanged(value); }, 它显示了一个错误The argument type 'voidFunction(String)' can't be assigned to the parameter type 'voidFunction(String?)?'我尝试放置final voidFunction() onChang