Flutter pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:164:13: Error: Method not found: ‘descr

引入最高版本的pull_to_refresh1.6.0无法编译通过,提示jar包的sliver.dart类中缺少各种方法

报错信息:

Compiler message:
file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:164:13: Error: Method not found: 'describeForError'.
      yield describeForError(
            ^^^^^^^^^^^^^^^^
file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:170:11: Error: Method not found: 'ErrorSummary'.
          ErrorSummary(
          ^^^^^^^^^^^^
file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:172:11: Error: Method not found: 'describeForError'.
          describeForError(
          ^^^^^^^^^^^^^^^^
file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:175:11: Error: Method not found: 'ErrorDescription'.
          ErrorDescription(
          ^^^^^^^^^^^^^^^^
file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:169:28: Error: Method not found: 'FlutterError.fromParts'.
        throw FlutterError.fromParts(<DiagnosticsNode>[
                           ^^^^^^^^^
file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:164:13: Error: The method 'describeForError' isn't defined for the class 'RenderSliverRefresh'.
 - 'RenderSliverRefresh' is from 'package:pull_to_refresh/src/internals/slivers.dart' ('file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart').
Try correcting the name to the name of an existing method, or defining a method named 'describeForError'.
      yield describeForError(
            ^^^^^^^^^^^^^^^^
file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:163:62: Error: The argument type 'Iterable<dynamic> Function()' can't be assigned to the parameter type 'void Function(StringBuffer)'.
 - 'Iterable' is from 'dart:core'.
 - 'StringBuffer' is from 'dart:core'.
Try changing the type of the parameter, or casting the argument to 'void Function(StringBuffer)'.
    assert(geometry.debugAssertIsValid(informationCollector: () sync* {
                                                             ^
file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:170:11: Error: The method 'ErrorSummary' isn't defined for the class 'RenderSliverRefresh'.
 - 'RenderSliverRefresh' is from 'package:pull_to_refresh/src/internals/slivers.dart' ('file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart').
Try correcting the name to the name of an existing method, or defining a method named 'ErrorSummary'.
          ErrorSummary(
          ^^^^^^^^^^^^
file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:172:11: Error: The method 'describeForError' isn't defined for the class 'RenderSliverRefresh'.
 - 'RenderSliverRefresh' is from 'package:pull_to_refresh/src/internals/slivers.dart' ('file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart').
Try correcting the name to the name of an existing method, or defining a method named 'describeForError'.
          describeForError(
          ^^^^^^^^^^^^^^^^
file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:175:11: Error: The method 'ErrorDescription' isn't defined for the class 'RenderSliverRefresh'.
 - 'RenderSliverRefresh' is from 'package:pull_to_refresh/src/internals/slivers.dart' ('file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart').
Try correcting the name to the name of an existing method, or defining a method named 'ErrorDescription'.
          ErrorDescription(
          ^^^^^^^^^^^^^^^^
file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:430:13: Error: Method not found: 'describeForError'.
      yield describeForError(
            ^^^^^^^^^^^^^^^^
file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:436:11: Error: Method not found: 'ErrorSummary'.
          ErrorSummary(
          ^^^^^^^^^^^^
file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:438:11: Error: Method not found: 'describeForError'.
          describeForError(
          ^^^^^^^^^^^^^^^^
file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:441:11: Error: Method not found: 'ErrorDescription'.
          ErrorDescription(
          ^^^^^^^^^^^^^^^^
file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:435:28: Error: Method not found: 'FlutterError.fromParts'.
        throw FlutterError.fromParts(<DiagnosticsNode>[

尝试各种方法无法成功引用1.6.0,改引用低版本时出错:Target of URI doesn’t exist ‘package:pull_to_refresh/pull_to_refresh.dart’
此时,修改项目.packages文件中的pull_to_refresh-1.6.0为低版本

pull_to_refresh:file:///Users/hyf/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.5.7/lib/
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值