telegram_share static method
convert messages_api to messages_api_tdlib example:
String telegram_share = GeneralLibUtils.telegram_share(text: "slebew", url: "hi"); // result: https://t.me/share/url?url=hi&text=slebew
Implementation
static String telegram_share({
required String text,
required String url,
}) {
final Map<String, String> queryParameters = {
"url": url,
"text": text,
};
queryParameters.removeWhere((key, value) => value.isEmpty);
return Uri.parse("https://t.me/share/url")
.replace(queryParameters: queryParameters)
.toString();
}