launchURL static method
Launch URL
Implementation
static Future<void> launchURL(BuildContext context, String url) async {
try {
await launchUrl(
Uri.parse(url).withScheme,
mode: LaunchMode.externalApplication,
);
} catch (e) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text(TIM_t("无法打开URL"))), // Cannot launch the url
);
}
}