fix 允许UID 为字符串

This commit is contained in:
yangjiejie12308 2023-07-13 17:25:37 +08:00
parent d7e8649c17
commit 03a309d8ee
7 changed files with 11 additions and 11 deletions

View File

@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":false,"dependencies":[]}],"web":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":[]}],"date_created":"2023-07-07 10:37:13.109602","version":"3.7.7"} {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":false,"dependencies":[]}],"web":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":[]}],"date_created":"2023-07-13 17:24:04.445236","version":"3.7.7"}

View File

@ -1,3 +1,3 @@
## 1.0.3 ## 1.0.4
* 修复重复收到消息的BUG * 允许链接到服务器的UID为字符串

View File

@ -9,7 +9,7 @@
``` ```
dependencies: dependencies:
cim_flutter_sdk: ^1.0.3 cim_flutter_sdk: ^1.0.4
``` ```
@ -37,7 +37,7 @@ import 'package:cim_flutter_sdk/cim_socket.dart';
connectStatus = value; connectStatus = value;
}); });
}); });
cimSocket!.init('127.0.0.1', 34567, 16501516154949); cimSocket!.init('127.0.0.1', 34567, '16501516154949');
cimSocket!.connect(); cimSocket!.connect();
} }
... ...

View File

@ -34,7 +34,7 @@ class _MyAppState extends State<MyApp> {
connectStatus = value; connectStatus = value;
}); });
}); });
cimSocket!.init('api.hoxin.farsunset.com', 34567, 16501516154949); cimSocket!.init('api.hoxin.farsunset.com', 34567, '16501516154949');
cimSocket!.connect(); cimSocket!.connect();
} }

View File

@ -31,7 +31,7 @@ packages:
path: ".." path: ".."
relative: true relative: true
source: path source: path
version: "1.0.3" version: "1.0.4"
clock: clock:
dependency: transitive dependency: transitive
description: description:

View File

@ -46,7 +46,7 @@ class CIMSocket {
late Socket? socket; late Socket? socket;
late String? uri; late String? uri;
late int? port; late int? port;
late int? uid; late String? uid;
late String endCode = "0"; late String endCode = "0";
final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin(); final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
final ValueChanged<messages.Model> onMessageReceived; final ValueChanged<messages.Model> onMessageReceived;
@ -59,7 +59,7 @@ class CIMSocket {
} }
}); });
Future init(String uri, int port, int uid) async { Future init(String uri, int port, String uid) async {
this.uri = uri; this.uri = uri;
this.port = port; this.port = port;
this.uid = uid; this.uid = uid;
@ -132,7 +132,7 @@ class CIMSocket {
md5.convert(const Utf8Encoder().convert(systemInfo.deviceId)).bytes); md5.convert(const Utf8Encoder().convert(systemInfo.deviceId)).bytes);
Map<String, String> map = { Map<String, String> map = {
"uid": uid.toString(), //id "uid": uid!, //id
"channel": channel, "channel": channel,
"appVersion": sOCKETAPPVERSION, "appVersion": sOCKETAPPVERSION,
"osVersion": systemVersion, "osVersion": systemVersion,

View File

@ -1,7 +1,7 @@
name: cim_flutter_sdk name: cim_flutter_sdk
description: a flutter sdk for cim. description: a flutter sdk for cim.
repository: https://gitee.com/farsunset/cim repository: https://gitee.com/farsunset/cim
version: 1.0.3 version: 1.0.4
homepage: http://farsunset.com/ homepage: http://farsunset.com/
environment: environment: