Format code

pull/295/head
Cheryl Zhang 4 years ago
parent 240688f06e
commit 0aa1a9cee0
  1. 4
      lib/src/widgets/editor.dart
  2. 6
      lib/src/widgets/text_selection.dart

@ -910,7 +910,9 @@ class RenderEditor extends RenderEditableContainerBox
endpoint = endpoints.first;
} else {
if (selection is DragTextSelection) {
endpoint = (selection as DragTextSelection).first ? endpoints.first : endpoints.last;
endpoint = (selection as DragTextSelection).first
? endpoints.first
: endpoints.last;
} else {
endpoint = endpoints.first;
}

@ -25,12 +25,10 @@ enum _TextSelectionHandlePosition { START, END }
/// internal use, used to get drag direction information
class DragTextSelection extends TextSelection {
final bool first;
const DragTextSelection({
TextAffinity affinity = TextAffinity.downstream,
int baseOffset = 0,
int extentOffset = 0,
TextAffinity affinity = TextAffinity.downstream,
bool isDirectional = false,
this.first = true,
}) : super(
@ -40,6 +38,8 @@ class DragTextSelection extends TextSelection {
isDirectional: isDirectional,
);
final bool first;
@override
DragTextSelection copyWith({
int? baseOffset,

Loading…
Cancel
Save