fluttercandies / flutter_drawing_board

A new Flutter package of drawing board
MIT License
199 stars 71 forks source link

更新版本的时候,无法运行程序 #20

Closed seth-shi closed 1 year ago

seth-shi commented 1 year ago

提示错误

/C:/__ENV__/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_drawing_board-0.4.1+4/lib/src/drawing_board.dart:154:11: Error: No named parameter with the name 'scaleFactor'.
          scaleFactor: widget.boardScaleFactor,
          ^^^^^^^^^^^
/C:/__ENV__/flutter/packages/flutter/lib/src/widgets/interactive_viewer.dart:60:3: Context: Found this candidate, but the arguments don't match.
  InteractiveViewer({
  ^^^^^^^^^^^^^^^^^
/C:/__ENV__/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_drawing_board-0.4.1+4/lib/src/paint_extension/ex_image_filter.dart:37:24: Error: Member not found: 'ImageFilter.dilate'.
    return ImageFilter.dilate(
                       ^^^^^^
/C:/__ENV__/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_drawing_board-0.4.1+4/lib/src/paint_extension/ex_image_filter.dart:45:24: Error: Member not found: 'ImageFilter.erode'.
    return ImageFilter.erode(
                       ^^^^^
/C:/__ENV__/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_drawing_board-0.4.1+4/lib/src/paint_extension/ex_image_filter.dart:67:11: Error: 'Float64List' isn't a type.
    final Float64List matrixList = Float64List.fromList(matrixListData);
          ^^^^^^^^^^^
/C:/__ENV__/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_drawing_board-0.4.1+4/lib/src/paint_extension/ex_image_filter.dart:67:36: Error: Undefined name 'Float64List'.
    final Float64List matrixList = Float64List.fromList(matrixListData);
                                   ^^^^^^^^^^^

FAILURE: Build failed with an exception.

* Where:
Script 'C:\__ENV__\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1102

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\__ENV__\flutter\bin\flutter.bat'' finished with non-zero exit value 1
xSILENCEx commented 1 year ago

可能需要先更新Flutter版本

seth-shi commented 1 year ago

我看 pubspec.json 的要求

environment:
  sdk: ">=2.12.0 <3.0.0"
  flutter: ">=1.17.0"

我的环境:

 flutter --version
Waiting for another flutter command to release the startup lock...
Flutter 2.10.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 5464c5bac7 (8 months ago) • 2022-04-18 09:55:37 -0700
Engine • revision 57d3bac3dd
Tools • Dart 2.16.2 • DevTools 2.9.2
xSILENCEx commented 1 year ago

新增的改动在3.3.9上进行的,可能有一些兼容性问题。明天我到公司试试低版本的SDK

seth-shi commented 1 year ago

好的, 感谢答复

xSILENCEx commented 1 year ago

添加了一个分支,支持Flutter3.0.0以下的SDK,使用git依赖引入,后续不再维护3.0.0以下的SDK

  flutter_drawing_board:
    git:
      url: https://github.com/fluttercandies/flutter_drawing_board
      ref: 2.10.5
seth-shi commented 1 year ago

感谢, 我这边升级一下自己的 Flutter 到 3+