首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >错误:非抽象类“InternalSelectableMathState”

错误:非抽象类“InternalSelectableMathState”
EN

Stack Overflow用户
提问于 2021-12-13 12:45:37
回答 8查看 8.9K关注 0票数 15

我刚刚将颤振版本从2.5.3升级到2.8。我有以下错误,我不知道如何解决它。在安装的任何插件上都没有错误,似乎错误来自内部类本身,我不知道错误在应用程序的哪一部分被抛出:

代码语言:javascript
运行
复制
../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutter_math_fork-0.3.3+1/lib/src/widgets/selectable.dart:407:7: Error: The non-abstract class 'InternalSelectableMathState' is missing implementations for these members:
 - TextSelectionDelegate.copySelection
 - TextSelectionDelegate.cutSelection
 - TextSelectionDelegate.pasteText
 - TextSelectionDelegate.selectAll
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 InternalSelectableMathState extends State<InternalSelectableMath>
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
/C:/desarrollo/flutter/packages/flutter/lib/src/services/text_input.dart:985:8: Context: 'TextSelectionDelegate.copySelection' is defined here.
  void copySelection(SelectionChangedCause cause);
       ^^^^^^^^^^^^^
/C:/desarrollo/flutter/packages/flutter/lib/src/services/text_input.dart:965:8: Context: 'TextSelectionDelegate.cutSelection' is defined here.
  void cutSelection(SelectionChangedCause cause);
       ^^^^^^^^^^^^
/C:/desarrollo/flutter/packages/flutter/lib/src/services/text_input.dart:973:16: Context: 'TextSelectionDelegate.pasteText' is defined here.
  Future<void> pasteText(SelectionChangedCause cause);
               ^^^^^^^^^
/C:/desarrollo/flutter/packages/flutter/lib/src/services/text_input.dart:979:8: Context: 'TextSelectionDelegate.selectAll' is defined here.
  void selectAll(SelectionChangedCause cause);
       ^^^^^^^^^


FAILURE: Build failed with an exception.

* Where:
Script 'C:\desarrollo\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1070

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

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 8m 5s
Exception: Gradle task assembleDebug failed with exit code 1

我没有在我的公共规范上声明flutter_math_fork

我的颤栗医生输出:

医生摘要(查看所有细节,运行颤振医生-v):√Flutter (频道稳定,2.8.0,在Microsoft上n 10.0.19041.1348,locale es-ES)√Android工具链-为√设备开发(Android版本31.0.0)√Chrome -为web√Android (版本2020.3)√VS代码(版本1.62.3)√连接设备(3可用)·无问题!

我已经尝试过:颤振清除、颤振升级和失效缓存/重新启动。

如有任何建议,将不胜感激。

EN

Stack Overflow用户

发布于 2022-02-08 07:36:14

我也遇到了同样的错误,我把下面的代码添加到pubscpec.yaml中,它现在开始工作了。如果它不起作用,您可以遵循上述方法

代码语言:javascript
运行
复制
dependency_overrides:
provider: 6.0.0
票数 1
EN
查看全部 8 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70334900

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档