| 12345678910111213141516171819202122232425262728 |
- 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<void> shareSystemFile(String packageName, String filePath,
- {String? shareTitle, String? shareFileType}) async {
- if (Platform.isAndroid) {
- return SystemShare.shareFile(filePath, packageName, shareTitle,
- shareFileType: shareFileType);
- }
- }
- static Future<bool> isInstalled(String packageName) {
- return SystemShare.isInstalled(packageName);
- }
- }
- class SystemShareException implements Exception {
- final String message;
- SystemShareException(this.message);
- }
|