../../flutter/packages/flutter/lib/src/painting/image_provider.dart:578:24: Context: This is the overridden method ('load').
ImageStreamCompleter load(T key, DecoderCallback decode);
^
lib/pages/group/group_page.dart:24:36: Error: 'Router' is imported from both 'package:flutter/src/widgets/router.dart' and 'package:doubanapp/router.dart'.
Router.push(context, Router.searchPage, hintText);
^^^^^^
lib/pages/group/group_page.dart:24:15: Error: 'Router' is imported from both 'package:flutter/src/widgets/router.dart' and 'package:doubanapp/router.dart'.
Router.push(context, Router.searchPage, hintText);
这里问题怎么解决?看了代码是存在的呀,为什么编译不通过? @kaina404
环境
[✓] Flutter (Channel dev, 1.21.0-9.0.pre, on Mac OS X 10.15.5 19F101, locale zh-Hans-CN)
• Flutter version 1.21.0-9.0.pre at /Users/xxx/flutter
• Framework revision 7c6f9dd239 (9 days ago), 2020-08-09 10:31:03 -0400
• Engine revision 6d86e67f04
• Dart version 2.10.0 (build 2.10.0-4.0.dev 0341576448)
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
../../flutter/packages/flutter/lib/src/painting/image_provider.dart:578:24: Context: This is the overridden method ('load'). ImageStreamCompleter load(T key, DecoderCallback decode); ^ lib/pages/group/group_page.dart:24:36: Error: 'Router' is imported from both 'package:flutter/src/widgets/router.dart' and 'package:doubanapp/router.dart'. Router.push(context, Router.searchPage, hintText); ^^^^^^ lib/pages/group/group_page.dart:24:15: Error: 'Router' is imported from both 'package:flutter/src/widgets/router.dart' and 'package:doubanapp/router.dart'. Router.push(context, Router.searchPage, hintText);
这里问题怎么解决?看了代码是存在的呀,为什么编译不通过? @kaina404
环境 [✓] Flutter (Channel dev, 1.21.0-9.0.pre, on Mac OS X 10.15.5 19F101, locale zh-Hans-CN) • Flutter version 1.21.0-9.0.pre at /Users/xxx/flutter • Framework revision 7c6f9dd239 (9 days ago), 2020-08-09 10:31:03 -0400 • Engine revision 6d86e67f04 • Dart version 2.10.0 (build 2.10.0-4.0.dev 0341576448) • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn
然后就成功跑起来了,放一下截图,证明我没有骗人![image](https://user-images.githubusercontent.com/11371532/90589287-54e6fe00-e210-11ea-8d0e-1be9ead06d3c.png)
还有一点我要提醒的,工程里面还有很多报红的地方,当时不影响编译,所以排查错误信息,请运行看控制台输出的错误信息,依次排查解决。