CakeWallet/cw_mweb/lib/cw_mweb_method_channel.dart

18 lines
563 B
Dart
Raw Normal View History

2024-04-21 00:20:52 +01:00
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'cw_mweb_platform_interface.dart';
/// An implementation of [CwMwebPlatform] that uses method channels.
class MethodChannelCwMweb extends CwMwebPlatform {
/// The method channel used to interact with the native platform.
@visibleForTesting
final methodChannel = const MethodChannel('cw_mweb');
@override
2024-04-21 12:19:44 +01:00
Future<int?> start(String dataDir) async {
final result = await methodChannel.invokeMethod<int>('start', {'dataDir': dataDir});
2024-04-21 00:20:52 +01:00
return result;
}
}