app-starlock/lib/tools/wechat/customer_tool.dart
2024-09-11 15:23:46 +08:00

19 lines
417 B
Dart

import 'package:url_launcher/url_launcher.dart';
//客服工具类
class CustomerTool {
static String _customerServiceUrl = '';
//初始化
static Future<void> init(String customerServiceUrl) async {
_customerServiceUrl = customerServiceUrl;
}
//打开客服
static void openCustomerService() {
if (_customerServiceUrl.isNotEmpty) {
launchUrl(Uri.parse(_customerServiceUrl));
}
}
}