TF-1201 Support right click to open mailbox in new tab

This commit is contained in:
dab246
2022-12-07 15:37:47 +07:00
committed by Dat H. Pham
parent c9cfd43734
commit 9af311ae1d
5 changed files with 31 additions and 9 deletions
+8
View File
@@ -1,5 +1,6 @@
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:tmail_ui_user/main/utils/app_config.dart';
import 'package:url_launcher/url_launcher.dart';
class AppUtils {
@@ -12,4 +13,11 @@ class AppUtils {
static Future<void> loadFcmConfigFile() {
return dotenv.load(fileName: AppConfig.appFCMConfigurationPath);
}
static Future<void> launchLink(String url, {bool isNewTab = true}) async {
await launchUrl(
Uri.parse(url),
webOnlyWindowName: isNewTab ? '_blank' : '_self',
);
}
}