import 'package:flutter/services.dart'; class NativeWebViewLauncher { static const MethodChannel _channel = MethodChannel('com.didvan.shareFile'); static Future openWebView(String url) async { try { await _channel.invokeMethod('openWebView', {'url': url}); } on PlatformException catch (e) { print("Failed to open native webview: '${e.message}'."); } } }