英文:
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 '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)
],
),
);
}
}
答案1
得分: 1
我遇到了相同的错误。我所做的是卸载了Flutter,然后重新安装。然后它就正常运行了。
英文:
I was having the same error. what I did is, I uninstalled flutter and installed new. Then it worked.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论