|
|
|
@ -1,4 +1,5 @@ |
|
|
|
|
import 'dart:math' as math; |
|
|
|
|
|
|
|
|
|
// ignore: unnecessary_import |
|
|
|
|
import 'dart:typed_data'; |
|
|
|
|
|
|
|
|
@ -192,7 +193,6 @@ class QuillEditor extends StatefulWidget { |
|
|
|
|
this.contentInsertionConfiguration, |
|
|
|
|
this.contextMenuBuilder, |
|
|
|
|
this.editorKey, |
|
|
|
|
this.textSelectionColor, |
|
|
|
|
Key? key, |
|
|
|
|
}) : super(key: key); |
|
|
|
|
|
|
|
|
@ -455,11 +455,6 @@ class QuillEditor extends StatefulWidget { |
|
|
|
|
/// editorKey.currentState?.renderEditor.getLocalRectForCaret |
|
|
|
|
final GlobalKey<EditorState>? editorKey; |
|
|
|
|
|
|
|
|
|
/// Allows for providing a custom text selection color. |
|
|
|
|
/// |
|
|
|
|
/// Defaults to Material selectionTheme or primary color. |
|
|
|
|
final Color? textSelectionColor; |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
QuillEditorState createState() => QuillEditorState(); |
|
|
|
|
} |
|
|
|
@ -498,8 +493,7 @@ class QuillEditorState extends State<QuillEditor> |
|
|
|
|
paintCursorAboveText = true; |
|
|
|
|
cursorOpacityAnimates = true; |
|
|
|
|
cursorColor ??= selectionTheme.cursorColor ?? cupertinoTheme.primaryColor; |
|
|
|
|
selectionColor = widget.textSelectionColor ?? |
|
|
|
|
selectionTheme.selectionColor ?? |
|
|
|
|
selectionColor = selectionTheme.selectionColor ?? |
|
|
|
|
cupertinoTheme.primaryColor.withOpacity(0.40); |
|
|
|
|
cursorRadius ??= const Radius.circular(2); |
|
|
|
|
cursorOffset = Offset( |
|
|
|
@ -509,8 +503,7 @@ class QuillEditorState extends State<QuillEditor> |
|
|
|
|
paintCursorAboveText = false; |
|
|
|
|
cursorOpacityAnimates = false; |
|
|
|
|
cursorColor ??= selectionTheme.cursorColor ?? theme.colorScheme.primary; |
|
|
|
|
selectionColor = widget.textSelectionColor ?? |
|
|
|
|
selectionTheme.selectionColor ?? |
|
|
|
|
selectionColor = selectionTheme.selectionColor ?? |
|
|
|
|
theme.colorScheme.primary.withOpacity(0.40); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|