private static Widget ProcessLinkOpen(Token token, BuilderContext ctx) { var uriString = token.attrs[0][1]; ctx.spanRecognizers.Add(new TapGestureRecognizer { onTap = () => { var uri = new Uri(uriString); switch (uri.Scheme.ToLower()) { case "manual": LocationUtil.Go($"/Manual/{uri.LocalPath}"); break; case "http": case "https": case "mailto": LocationUtil.HrefTo(uriString); break; case "scripting": LocationUtil.Go($"/Scripting/{uri.LocalPath}"); break; case "attachment": LocationUtil.Download( $"{Configuration.Instance.apiHost}/api/documentation/resource/v/2018.1/t/manual_static/f/{uri.LocalPath}", uri.LocalPath ); break; default: Debug.Log($"Unrecognized scheme of uri {uriString}"); break; } } }); var span = new TextSpan( children: new List <TextSpan>(), style: new TextStyle( color: new Color(0xffe91e63), decoration: TextDecoration.underline ) ); ctx.inline.Push(span); ctx.useRecognizer = true; return(null); }