请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

flutter_trip项目运行不起来

运行的仓库中的源码,把demo文件夹删除后,把environment下 sdk: ‘>=3.1.3 <4.0.0’ 或 sdk: “>=2.12.0 <3.0.0” cupertino_icons: ^1.0.2 然后pub get就剩下下面的报错信息了,要不改environment的话,pub get不了

没找到SearchBar
’SearchBar’ isn’t a function.
Try correcting the name to match an existing function, or define a method or function named ‘SearchBar’.
The name ‘SearchBar’ is defined in the libraries ‘package:flutter/src/material/search_anchor.dart (via package:flutter/material.dart)’ and ‘package:flutter_trip/widget/search_bar.dart’.
Try using ‘as prefix’ for one of the import directives, or hiding the name from all but one of the imports.

Error (Xcode): lib/pages/search_page.dart:125:22: Error: ‘SearchBar’ is imported from both
’package:flutter/src/material/search_anchor.dart’ and ‘package:flutter_trip/widget/search_bar.dart’.

正在回答 回答被采纳积分+3

1回答

CrazyCodeBoy 2023-10-30 08:24:32
后来问题解决了吗
0 回复 有任何疑惑可以回复我~

相似问题

登录后可查看更多问答,登录/注册

问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号