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([
                           ^^^^^^^^^
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 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([

尝试各种方法无法成功引用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/

你可能感兴趣的:(Flutter pull_to_refresh-1.6.0/lib/src/internals/slivers.dart:164:13: Error: Method not found: ‘descr)