我的代码有问题。之前一切正常,但现在我收到此错误。我认为这是一个很小的错误,但是我看不到吗?我是个新手,知识也不多。从现在开始,我正在做一个视频课程。有人可以帮我吗?
谢谢!
错误消息:
//Define Routes
app.use('/api/auth', require('./routes/auth'));
products.dart:
#0 Products.fetchAndSetProducts.<anonymous closure> (package:shop_app_flutter/providers/products.dart:83:26)
#1 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:367:8)
#2 Products.fetchAndSetProducts (package:shop_app_flutter/providers/products.dart:80:21)
<asynchronous suspension>
#3 _ProductsOverviewScreenState.didChangeDependencies (package:shop_app_flutter/screens/products_overview_screen.dart:41:38)
#4 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3862:12)
#5 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3717:5)
#6 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2961:14)
#7 Element.updateChild (package:flutter/src/widgets/framework.dart:2764:12)
#8 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/f<…>