cim/cim-client-sdk/cim-flutter-sdk/lib/cim_flutter_sdk.dart
2023-06-14 09:36:31 +08:00

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();
}
}