flutter_quill错误:未找到类型 ‘DragSelectionUpdateCallback’

huangapple go评论54阅读模式
英文:

flutter_quill Error : Type 'DragSelectionUpdateCallback' not found"

问题

我遇到了这个错误。


启动 lib/main.dart 在 iPhone 13 上的调试模式...
lib/main.dart:1
Xcode 构建完成。 5.6秒
iOS 应用构建失败
错误(Xcode):../../../.pub-cache/hosted/pub.dev/flutter_quill-6.3.5/lib/src/widgets/text_selection.dart:779:9: 错误:未找到类型 'DragSelectionUpdateCallback'。
../…/widgets/text_selection.dart:779
无法为模拟器构建应用程序。
在 iPhone 13 上启动应用程序时出错。
退出


无论我如何谷歌搜索,都找不到类似类型的错误。
你能帮帮我吗?

import 'package:flutter/material.dart';
import 'package:flutter_quill/flutter_quill.dart';

class FlutterQuillScreen extends StatefulWidget {
  const FlutterQuillScreen({super.key});

  @override
  State<FlutterQuillScreen> createState() => _FlutterQuillScreenState();
}

class _FlutterQuillScreenState extends State<FlutterQuillScreen> {
  final _controller = QuillController.basic();
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          QuillToolbar.basic(controller: _controller),
          QuillEditor.basic(controller: _controller, readOnly: false)
        ],
      ),
    );
  }
}
英文:

I am getting this error.


Launching lib/main.dart on iPhone 13 in debug mode...
lib/main.dart:1
Xcode build done. 5.6s
Failed to build iOS app
Error (Xcode): ../../../.pub-cache/hosted/pub.dev/flutter_quill-6.3.5/lib/src/widgets/text_selection.dart:779:9: Error: Type 'DragSelectionUpdateCallback' not found.
../…/widgets/text_selection.dart:779
Could not build the application for the simulator.
Error launching application on iPhone 13.
Exited


No matter how much I googled, I couldn't find a similar type of error.
can you help me?

import &#39;package:flutter/material.dart&#39;;
import &#39;package:flutter_quill/flutter_quill.dart&#39;;

class FlutterQuillScreen extends StatefulWidget {
  const FlutterQuillScreen({super.key});

  @override
  State&lt;FlutterQuillScreen&gt; createState() =&gt; _FlutterQuillScreenState();
}

class _FlutterQuillScreenState extends State&lt;FlutterQuillScreen&gt; {
  final _controller = QuillController.basic();
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          QuillToolbar.basic(controller: _controller),
          QuillEditor.basic(controller: _controller, readOnly: false)
        ],
      ),
    );
  }
}

答案1

得分: 1

我遇到了相同的错误。我所做的是卸载了Flutter,然后重新安装。然后它就正常运行了。

英文:

I was having the same error. what I did is, I uninstalled flutter and installed new. Then it worked.

huangapple
  • 本文由 发表于 2023年2月16日 14:44:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/75468690.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定