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