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