diff --git a/lib/src/widgets/editor.dart b/lib/src/widgets/editor.dart index 667d6d7e..52cf9a67 100644 --- a/lib/src/widgets/editor.dart +++ b/lib/src/widgets/editor.dart @@ -477,8 +477,8 @@ class QuillEditorState extends State selectionColor = selectionTheme.selectionColor ?? cupertinoTheme.primaryColor.withOpacity(0.40); cursorRadius ??= const Radius.circular(2); - cursorOffset = Offset( - iOSHorizontalOffset / MediaQuery.of(context).devicePixelRatio, 0); + cursorOffset = + Offset(iOSHorizontalOffset / View.of(context).devicePixelRatio, 0); } else { textSelectionControls = materialTextSelectionControls; paintCursorAboveText = false; diff --git a/lib/src/widgets/raw_editor.dart b/lib/src/widgets/raw_editor.dart index 8a669c0c..9319bfab 100644 --- a/lib/src/widgets/raw_editor.dart +++ b/lib/src/widgets/raw_editor.dart @@ -968,7 +968,7 @@ class RawEditorState extends EditorState widget.selectionColor, widget.enableInteractiveSelection, _hasFocus, - MediaQuery.of(context).devicePixelRatio, + View.of(context).devicePixelRatio, _cursorCont); return editableTextLine; } diff --git a/lib/src/widgets/text_block.dart b/lib/src/widgets/text_block.dart index 4adaac37..3906fb88 100644 --- a/lib/src/widgets/text_block.dart +++ b/lib/src/widgets/text_block.dart @@ -159,7 +159,7 @@ class EditableTextBlock extends StatelessWidget { color, enableInteractiveSelection, hasFocus, - MediaQuery.of(context).devicePixelRatio, + View.of(context).devicePixelRatio, cursorCont); final nodeTextDirection = getDirectionOfNode(line); children.add(Directionality(