我在我的应用程序中使用flutter_smartlook进行监控。它工作正常,但升级到最新版本后4.1.7.运行时开始出错。如果我降级到4.1.5。它工作正常。有人知道出了什么问题吗?
为了使用最新的Flutter版本3.13.0,我别无选择,只能将软件包升级到4.1.7。或者我必须使用旧的Flutter版本3.10.6
错误:
/Users/casperonflutter/.pub-cache/hosted/pub.dev/flutter_smartlook-4.1.7/lib/wireframe/element_descriptors/canvas_descriptor.dart:7:7: Error: The non-abstract class 'CustomCanvas' is
missing implementations for these members:
- Canvas.clipPath
- Canvas.clipRRect
- Canvas.clipRect
- Canvas.drawAtlas
- Canvas.drawColor
- Canvas.drawDRRect
- Canvas.drawImage
- Canvas.drawImageNine
- Canvas.drawImageRect
- Canvas.drawOval
- Canvas.drawPaint
- Canvas.drawParagraph
- Canvas.drawPicture
- Canvas.drawPoints
- Canvas.drawRRect
- Canvas.drawRawAtlas
- Canvas.drawRawPoints
- Canvas.drawShadow
- Canvas.drawVertices
- Canvas.getDestinationClipBounds
- Canvas.getLocalClipBounds
- Canvas.getSaveCount
- Canvas.getTransform
- Canvas.restore
- Canvas.restoreToCount
- Canvas.rotate
- Canvas.save
- Canvas.saveLayer
- Canvas.scale
- Canvas.skew
- Canvas.transform
- Canvas.translate
Try to either
- provide an implementation,
- inherit an implementation from a superclass or mixin,
- mark the class as abstract, or
- provide a 'noSuchMethod' implementation.
class CustomCanvas extends Canvas {
^^^^^^^^^^^^
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.clipPath' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.clipRRect' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.clipRect' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.drawAtlas' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.drawColor' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.drawDRRect' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.drawImage' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.drawImageNine' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.drawImageRect' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.drawOval' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.drawPaint' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.drawParagraph' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.drawPicture' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.drawPoints' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.drawRRect' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.drawRawAtlas' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.drawRawPoints' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.drawShadow' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.drawVertices' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.getDestinationClipBounds' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.getLocalClipBounds' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.getSaveCount' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.getTransform' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.restore' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.restoreToCount' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.rotate' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.save' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.saveLayer' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.scale' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.skew' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.transform' is defined here.
org-dartlang-sdk:///lib/ui/canvas.dart: Context: 'Canvas.translate' is defined here.
/Users/casperonflutter/.pub-cache/hosted/pub.dev/flutter_google_places_sdk-0.3.2+9/lib/flutter_google_places_sdk.dart:123:55: Error: Member not found: 'ALL'.
PlaceTypeFilter placeTypeFilter = PlaceTypeFilter.ALL,
^^^
/Users/casperonflutter/.pub-cache/hosted/pub.dev/flutter_google_places_sdk-0.3.2+9/lib/flutter_google_places_sdk.dart:132:11: Error: No named parameter with the name
'placeTypeFilter'.
placeTypeFilter: placeTypeFilter,
^^^^^^^^^^^^^^^
/Users/casperonflutter/.pub-cache/hosted/pub.dev/flutter_smartlook-4.1.7/lib/wireframe/element_descriptors/canvas_descriptor.dart:13:7: Error: Superclass has no constructor named
'Canvas'.
) : super(recorder);
^^^^^
/Users/casperonflutter/.pub-cache/hosted/pub.dev/flutter_smartlook-4.1.7/lib/wireframe/element_descriptors/canvas_descriptor.dart:17:11: Error: Superclass has no method named
'drawRect'.
super.drawRect(rect, paint);
^^^^^^^^
/Users/casperonflutter/.pub-cache/hosted/pub.dev/flutter_smartlook-4.1.7/lib/wireframe/element_descriptors/canvas_descriptor.dart:27:11: Error: Superclass has no method named
'drawCircle'.
super.drawCircle(c, radius, paint);
^^^^^^^^^^
/Users/casperonflutter/.pub-cache/hosted/pub.dev/flutter_smartlook-4.1.7/lib/wireframe/element_descriptors/canvas_descriptor.dart:39:11: Error: Superclass has no method named
'drawArc'.
super.drawArc(rect, startAngle, sweepAngle, useCenter, paint);
^^^^^^^
/Users/casperonflutter/.pub-cache/hosted/pub.dev/flutter_smartlook-4.1.7/lib/wireframe/element_descriptors/canvas_descriptor.dart:45:11: Error: Superclass has no method named
'drawPath'.
super.drawPath(path, paint);
^^^^^^^^
/Users/casperonflutter/.pub-cache/hosted/pub.dev/flutter_smartlook-4.1.7/lib/wireframe/element_descriptors/canvas_descriptor.dart:65:11: Error: Superclass has no method named
'drawLine'.
super.drawLine(p1, p2, paint);
^^^^^^^^
Unhandled exception:
Null check operator used on a null value
#0 ProgramCompiler._emitSuperConstructorCallIfNeeded (package:dev_compiler/src/kernel/compiler.dart:1962:47)
#1 ProgramCompiler._emitConstructorBody (package:dev_compiler/src/kernel/compiler.dart:1901:19)
#2 ProgramCompiler._emitConstructor.<anonymous closure>.<anonymous closure> (package:dev_compiler/src/kernel/compiler.dart:1848:19)
#3 ProgramCompiler._superDisallowed (package:dev_compiler/src/kernel/compiler.dart:4107:24)
#4 ProgramCompiler._emitConstructor.<anonymous closure> (package:dev_compiler/src/kernel/compiler.dart:1847:15)
#5 ProgramCompiler._withLetScope (package:dev_compiler/src/kernel/compiler.dart:2693:25)
#6 ProgramCompiler._withCurrentFunction (package:dev_compiler/src/kernel/compiler.dart:4097:18)
#7 ProgramCompiler._emitConstructor (package:dev_compiler/src/kernel/compiler.dart:1845:16)
#8 ProgramCompiler._defineConstructors (package:dev_compiler/src/kernel/compiler.dart:1459:28)
#9 ProgramCompiler._emitClassDeclaration (package:dev_compiler/src/kernel/compiler.dart:879:19)
#10 ProgramCompiler._emitClass (package:dev_compiler/src/kernel/compiler.dart:802:25)
#11 List.forEach (dart:core-patch/growable_array.dart:416:8)
#12 ProgramCompiler._emitLibrary (package:dev_compiler/src/kernel/compiler.dart:740:23)
2条答案
按热度按时间6psbrbz91#
刚刚得到了smartlook的支持回复。在这里张贴他们的回应:
“目前,我们的SDK中唯一可以与3.12.x版本的flutter一起使用的版本是预发布的https://pub.dev/packages/flutter_smartlook/versions/4.1.8-flutter3.13.0。请使用那个,你不应该面对这个问题,让我知道如果你有任何进一步的问题。
fkaflof62#
他们搞砸了一点与释放,现在一个新的版本4.18是出来,但它不支持flutter13,所以如果你定义你的依赖在清单与插入符号
它不会工作,你需要通过删除插入符号来坚持确切的版本:
我希望他们能很快合并扑13的变化,主要分支,它已经出了几个月了。