launch method
Implementation
Future<bool> launch({LaunchMode mode = LaunchMode.platformDefault, bool showErrorToas = true}) async {
try {
if (await canLaunchUrlString(this)) {
return launchUrlString(this, mode: mode);
}
if (showErrorToas) {
MToast.showToast('无法打开链接');
}
return false;
} catch (_) {
if (showErrorToas) {
MToast.showToast('无法打开链接');
}
return false;
}
}