xuelongqy / flutter_easy_refresh

A flutter widget that provides pull-down refresh and pull-up load.
https://xuelongqy.github.io/flutter_easy_refresh/
MIT License
3.85k stars 630 forks source link

3.3.2需要兼容旧的Flutter版本 #722

Closed LinXunFeng closed 1 year ago

LinXunFeng commented 1 year ago
flutter --version
Flutter 3.3.10 • channel unknown • unknown source
Framework • revision 135454af32 (5 months ago) • 2022-12-15 07:36:55 -0800
Engine • revision 3316dd8728
Tools • Dart 2.18.6 • DevTools 2.15.0
../../../../.pub-cache/hosted/pub.dartlang.org/easy_refresh-3.3.2/lib/src/physics/scroll_physics.dart:434:44: Error: The getter 'devicePixelRatio' isn't defined for the class 'ScrollMetrics'.
 - 'ScrollMetrics' is from 'package:flutter/src/widgets/scroll_metrics.dart' ('../../../../flutter/packages/flutter/lib/src/widgets/scroll_metrics.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'devicePixelRatio'.
          velocity: 1.0 / (0.050 * metrics.devicePixelRatio),
                                           ^^^^^^^^^^^^^^^^
../../../../.pub-cache/hosted/pub.dartlang.org/easy_refresh-3.3.2/lib/src/physics/scroll_physics.dart:435:35: Error: The getter 'devicePixelRatio' isn't defined for the class 'ScrollMetrics'.
 - 'ScrollMetrics' is from 'package:flutter/src/widgets/scroll_metrics.dart' ('../../../../flutter/packages/flutter/lib/src/widgets/scroll_metrics.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'devicePixelRatio'.
          distance: 1.0 / metrics.devicePixelRatio,
                                  ^^^^^^^^^^^^^^^^
gq1205 commented 1 year ago

同上,这是直接干到3.10了吗?

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.7.12, on macOS 13.3.1 22E772610a darwin-arm64, locale zh-Hans-CN) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) [✓] Xcode - develop for iOS and macOS (Xcode 14.3) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.3) [✓] VS Code (version 1.78.2) [✓] Connected device (3 available) [✓] HTTP Host Availability

xuelongqy commented 1 year ago

试试3.3.2+1