shenghy / flutter_shop

一个Flutter的电商实战项目,包括首页、列表页、详细页、购物车页和会员中心,配有全套文字和视频教程。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

packages get之后 运行模拟器报错

lijing89 opened this issue · comments

Compiler message:
file:///users/xxx/flutter/.pub-cache/hosted/pub.flutter-io.cn/flustars-0.2.5/lib/src/widget_util.dart:88:8: Error: No named parameter with the name 'onError'.
}, onError: (dynamic exception, StackTrace stackTrace) {
^^^^^^^
file:///users/xxx/flutter/.pub-cache/hosted/pub.flutter-io.cn/flustars-0.2.5/lib/src/widget_util.dart:115:8: Error: No named parameter with the name 'onError'.
}, onError: (dynamic exception, StackTrace stackTrace) {
^^^^^^^
file:///users/xxx/flutter/.pub-cache/hosted/pub.flutter-io.cn/cached_network_image-0.7.0/lib/src/cached_network_image_provider.dart:46:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.

  • 'StringBuffer' is from 'dart:core'.
  • 'Iterable' is from 'dart:core'.
  • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///users/xxx/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
    informationCollector: (StringBuffer information) {
    ^
    Compiler failed on /Users/xxx/Documents/demo/flutter/flutter_deer-master/lib/main.dart
    Error launching application on iPhone Xʀ.

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.7.8+hotfix.3, on Mac OS X 10.14.5 18F132, locale zh-Hans-AL)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
[✓] iOS tools - develop for iOS devices
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.35.1)
[✓] Connected device (1 available)

• No issues found!

应该是你们的flutter版本不一致导致的 我的也是这样 但是可以看着视频自己做

胖哥最好可以将之升级到目前最新版的 毕竟一年前的代码了