flutter_trip项目运行不起来

来源:8-2 APP首页框架搭建-Scaffold与PageView【搭了个框架】

宝慕林653982

2023-10-27

运行的仓库中的源码,把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’.

写回答

1回答

CrazyCodeBoy

2023-10-30

后来问题解决了吗
0
0

Flutter从入门到进阶 实战携程网App 一网打尽核心技术

解锁Flutter开发新姿势,,系统掌握Flutter开发核心技术。

4788 学习 · 3270 问题

查看课程