mirror of
https://gitee.com/farsunset/cim.git
synced 2025-07-13 20:09:06 +08:00
23 lines
813 B
Dart
23 lines
813 B
Dart
// You have generated a new plugin project without specifying the `--platforms`
|
|
// flag. A plugin project with no platform support was generated. To add a
|
|
// platform, run `flutter create -t plugin --platforms <platforms> .` under the
|
|
// same directory. You can also find a detailed instruction on how to add
|
|
// platforms in the `pubspec.yaml` at
|
|
// https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms.
|
|
|
|
import 'CimSocket.dart';
|
|
import 'cim_flutter_sdk_platform_interface.dart';
|
|
|
|
class CimFlutterSdk {
|
|
final CIMSocket cimSocket = CIMSocket();
|
|
Future<CIMSocket> connect(String uri, int port, int uid) async {
|
|
cimSocket.init(uri, port, uid);
|
|
cimSocket.connect();
|
|
return cimSocket;
|
|
}
|
|
|
|
Future<void> disconnect() async {
|
|
cimSocket.disConnect();
|
|
}
|
|
}
|