import 'dart:io' show Platform; import 'package:flutter/services.dart'; class ShareService { static const _channel = MethodChannel('org.buetow.quicklog/share'); static Future readSharedTextFromCache() async { if (!Platform.isAndroid) return null; try { return await _channel.invokeMethod('readSharedTextFromCache'); } on MissingPluginException { return null; } } static Future clearSharedTextCache() async { if (!Platform.isAndroid) return; try { await _channel.invokeMethod('clearSharedTextCache'); } on MissingPluginException { // No-op: channel not registered (e.g. running on a non-Android target). } } }