import 'dart:io'; import 'package:system_share/system_share.dart'; class SystemShareUtil { SystemShareUtil._(); static const wechatPageName = 'com.tencent.mm'; static const qqPageName = 'com.tencent.mobileqq'; static Future shareSystemFile(String packageName, String filePath, {String? shareTitle, String? shareFileType}) async { if (Platform.isAndroid) { return SystemShare.shareFile(filePath, packageName, shareTitle, shareFileType: shareFileType); } } static Future isInstalled(String packageName) { return SystemShare.isInstalled(packageName); } } class SystemShareException implements Exception { final String message; SystemShareException(this.message); }