LinkSniffer constructor

LinkSniffer({
  1. TextStyle? style,
  2. TextStyle? hoverStyle,
  3. RegExp? pattern,
})

Creates a link sniffer, optionally overriding the default style, hoverStyle or pattern.

Implementation

LinkSniffer({TextStyle? style, super.hoverStyle, RegExp? pattern})
    : super(
        style: style ??
            const TextStyle(
                color: Colors.blue, decoration: TextDecoration.underline),
        pattern: pattern ??
            RegExp(
                r'((https?|ftps?|sftp|file|telnet|ssh|wss?|irc|rtsp|rtmp):\/\/[^\s<>()]+'
                r'|www\.[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+(\/[^\s<>()]*)?)',
                caseSensitive: false),
      );