diff --git a/lib/flutter_linkify.dart b/lib/flutter_linkify.dart index 741fc05..4eb2416 100644 --- a/lib/flutter_linkify.dart +++ b/lib/flutter_linkify.dart @@ -292,7 +292,7 @@ class SelectableLinkify extends StatelessWidget { showCursor: showCursor, textScaleFactor: textScaleFactor, autofocus: autofocus, - contextMenuBuilder: contextMenuBuilder, + contextMenuBuilder: contextMenuBuilder ?? defaultContextMenuBuilder, cursorWidth: cursorWidth, cursorRadius: cursorRadius, cursorColor: cursorColor, @@ -393,3 +393,10 @@ class LinkifySpan extends TextSpan { ), ); } + +Widget defaultContextMenuBuilder( + BuildContext context, EditableTextState editableTextState) { + return AdaptiveTextSelectionToolbar.editableText( + editableTextState: editableTextState, + ); +}