19 lines
417 B
Dart
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));
|
|
}
|
|
}
|
|
}
|