Rename _onTapping method

pull/13/head
singerdmx 4 years ago
parent e54787eb23
commit 3853c92bd1
  1. 6
      lib/widgets/editor.dart
  2. 2
      lib/widgets/text_line.dart

@ -321,7 +321,7 @@ class _QuillEditorSelectionGestureDetectorBuilder
} }
} }
_tappingUrlOrImage(TapUpDetails details) { _onTapping(TapUpDetails details) {
TextPosition pos = TextPosition pos =
getRenderEditor().getPositionForOffset(details.globalPosition); getRenderEditor().getPositionForOffset(details.globalPosition);
containerNode.ChildQuery result = containerNode.ChildQuery result =
@ -347,6 +347,7 @@ class _QuillEditorSelectionGestureDetectorBuilder
urlRegExp.firstMatch(link.trim()) != null) { urlRegExp.firstMatch(link.trim()) != null) {
launchUrl(link); launchUrl(link);
} }
return;
} }
if (getEditor().widget.readOnly && segment.value is BlockEmbed) { if (getEditor().widget.readOnly && segment.value is BlockEmbed) {
BlockEmbed blockEmbed = segment.value as BlockEmbed; BlockEmbed blockEmbed = segment.value as BlockEmbed;
@ -359,6 +360,7 @@ class _QuillEditorSelectionGestureDetectorBuilder
), ),
); );
} }
return;
} }
} }
@ -373,7 +375,7 @@ class _QuillEditorSelectionGestureDetectorBuilder
onSingleTapUp(TapUpDetails details) { onSingleTapUp(TapUpDetails details) {
getEditor().hideToolbar(); getEditor().hideToolbar();
_tappingUrlOrImage(details); _onTapping(details);
if (delegate.getSelectionEnabled()) { if (delegate.getSelectionEnabled()) {
switch (Theme.of(_state.context).platform) { switch (Theme.of(_state.context).platform) {

@ -221,7 +221,7 @@ class TextLine extends StatelessWidget {
} }
if (!s.startsWith('#')) { if (!s.startsWith('#')) {
throw("Color code not supported"); throw ("Color code not supported");
} }
String hex = s.replaceFirst('#', ''); String hex = s.replaceFirst('#', '');

Loading…
Cancel
Save