flutter class小部件“观看”功能有错误
我想通过手表函数制作一个var,但是它不断发生和错误,这是代码:
class Booking extends ConsumerWidget {
@override
Widget build(BuildContext context, watch) {
var step = watch(currentStep).state;
var mallWatch = watch(selectedMall).state;
var内部的“手表”继续获得红色下划线,错误是“表达式未评估到功能,所以无法调用“请帮忙,谢谢
I want to make a var with watch function, but it keep getting and error this is the code :
class Booking extends ConsumerWidget {
@override
Widget build(BuildContext context, watch) {
var step = watch(currentStep).state;
var mallWatch = watch(selectedMall).state;
the "watch" inside the var keep getting a red underline, the error is "The expression doesn't evaluate to a function, so it can't be invoked" please help, thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过
Skimmed through Riverpod docs and apparently your code should be: