import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'system_share_platform_interface.dart'; /// An implementation of [SystemSharePlatform] that uses method channels. class MethodChannelSystemShare extends SystemSharePlatform { /// The method channel used to interact with the native platform. @visibleForTesting final methodChannel = const MethodChannel('system_share'); @override Future isInstalled(String packageName) async { return await methodChannel.invokeMethod("isInstalled", { "packageName": packageName, }); } @override void shareFile(String filePath, String packageName, String? shareTitle, {String? shareFileType}) { methodChannel.invokeMethod("shareFile", { "filePath": filePath, "packageName": packageName, "shareTitle": shareTitle, "shareFileType": shareFileType, }); } }