diff --git a/lib/src/widgets/raw_editor.dart b/lib/src/widgets/raw_editor.dart index 002c62b1..0629b102 100644 --- a/lib/src/widgets/raw_editor.dart +++ b/lib/src/widgets/raw_editor.dart @@ -140,8 +140,7 @@ class RawEditorState extends EditorState super.build(context); var _doc = widget.controller.document; - if (_doc.isEmpty() && - widget.placeholder != null) { + if (_doc.isEmpty() && widget.placeholder != null) { _doc = Document.fromJson(jsonDecode( '[{"attributes":{"placeholder":true},"insert":"${widget.placeholder}\\n"}]')); } diff --git a/lib/src/widgets/text_selection.dart b/lib/src/widgets/text_selection.dart index 96e5310f..8e0b3b64 100644 --- a/lib/src/widgets/text_selection.dart +++ b/lib/src/widgets/text_selection.dart @@ -287,7 +287,6 @@ class _TextSelectionHandleOverlay extends StatefulWidget { class _TextSelectionHandleOverlayState extends State<_TextSelectionHandleOverlay> with SingleTickerProviderStateMixin { - late Offset _dragPosition; late Size _handleSize; late AnimationController _controller; @@ -329,13 +328,12 @@ class _TextSelectionHandleOverlayState } void _handleDragStart(DragStartDetails details) { - _dragPosition = details.globalPosition + Offset(0.0, -_handleSize.height); + _dragPosition = details.globalPosition + Offset(0, -_handleSize.height); } void _handleDragUpdate(DragUpdateDetails details) { _dragPosition += details.delta; - final position = - widget.renderObject!.getPositionForOffset(_dragPosition); + final position = widget.renderObject!.getPositionForOffset(_dragPosition); if (widget.selection.isCollapsed) { widget.onSelectionHandleChanged(TextSelection.fromPosition(position)); return;