-
Notifications
You must be signed in to change notification settings - Fork 996
Description
Have you checked for an existing issue?
- I have searched the existing issues
Flutter Quill Version
11.0.0-dev.4
Steps to Reproduce
When two editors share the same controller, the app freezes immediately in Web. In Android it freezes too, but after some typing in one of the editors.
My app uses two simultaneos editors with different controllers. The second one is readonly, and is updated copying delta changes from the first with a listener. In that situation I found that the app freezed and trying to debug it I found this simpler situation that may be related.
import 'package:flutter/material.dart';
import 'package:flutter_quill/flutter_quill.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
void main() => runApp(const MainApp());
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData.light(useMaterial3: true),
darkTheme: ThemeData.dark(useMaterial3: true),
themeMode: ThemeMode.system,
home: HomePage(),
localizationsDelegates: [
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
FlutterQuillLocalizations.delegate,
],
);
}
}
class HomePage extends StatefulWidget {
const HomePage({super.key});
@override
State<HomePage> createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
final _controller = QuillController.basic();
@override
void initState() {
super.initState();
// Load document
_controller.document = Document();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Flutter Quill Example'),
actions: [],
),
body: SafeArea(
child: Column(
children: [
Expanded(
child: QuillEditor.basic(
controller: _controller,
config: QuillEditorConfig(),
),
),
Expanded(
child: QuillEditor.basic(
controller: _controller,
config: QuillEditorConfig(),
),
),
],
),
),
);
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
}
Expected results
Both editors should show same content, without crashing the app
Actual results
Web: App freezes on the first character typed
Android: Withstands some interactions updating both editors, but then ANRs
Additional Context
% flutter doctor -v
[✓] Flutter (Channel beta, 3.32.0-0.3.pre, on macOS 15.4.1 24E263 darwin-arm64, locale es-AR) [441ms]
• Flutter version 3.32.0-0.3.pre on channel beta at /Users/pablo/Proyectos/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 3bd718ee44 (2 weeks ago), 2025-04-30 10:11:08 -0700
• Engine revision 453dd7174c
• Dart version 3.8.0 (build 3.8.0-278.2.beta)
• DevTools version 2.45.1
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc3) [1.714ms]
• Android SDK at /Users/pablo/Library/Android/sdk
• Platform android-35, build-tools 35.0.0-rc3
• ANDROID_HOME = /Users/pablo/Library/Android/sdk
• ANDROID_SDK_ROOT = /Users/pablo/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: flutter config --jdk-dir="path/to/jdk".
• Java version OpenJDK Runtime Environment (build 21.0.6+-13368085-b895.109)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.3) [881ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16E140
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [9ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.3) [8ms]
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.6+-13368085-b895.109)
[✓] VS Code (version 1.100.2) [7ms]
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.111.20250501
[✓] Connected device (4 available) [6,1s]
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 14 (API 34) (emulator)
• iPhone de Pablo (mobile) • 00008110-001E38D03651801E • ios • iOS 18.4.1 22E252
• macOS (desktop) • macos • darwin-arm64 • macOS 15.4.1 24E263 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 136.0.7103.114
[✓] Network resources [548ms]
• All expected network resources are available.
• No issues found!