mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-12 11:24:08 +00:00
23 lines
512 B
Dart
23 lines
512 B
Dart
import 'package:flutter/services.dart';
|
|
|
|
import '../libgopeed_interface.dart';
|
|
|
|
class LibgopeedChannel implements LibgopeedAbi {
|
|
static const _channel = MethodChannel('gopeed.com/libgopeed');
|
|
|
|
@override
|
|
Future<void> init(String cfg) async {
|
|
await _channel.invokeMethod<String>('init', {
|
|
'cfg': cfg,
|
|
});
|
|
}
|
|
|
|
@override
|
|
Future<String> invoke(String params) async {
|
|
final result = await _channel.invokeMethod<String>('invoke', {
|
|
'params': params,
|
|
});
|
|
return result!;
|
|
}
|
|
}
|