From 9b0caf6b1305b987c8b08ca8895e718541e8a853 Mon Sep 17 00:00:00 2001 From: hatemragab Date: Thu, 6 Jan 2022 14:13:35 +0200 Subject: [PATCH] update .readMe --- CHANGELOG.md | 3 +++ README.md | 4 ++- .../group_chat_info/group_chat_info.dart | 2 +- lib/src/models/v_chat_group_user.dart | 18 ++++++------- lib/src/services/socket_service.dart | 27 +++++++++---------- pubspec.yaml | 2 +- v_chat_theme_usage | 4 --- 7 files changed, 30 insertions(+), 30 deletions(-) delete mode 100644 v_chat_theme_usage diff --git a/CHANGELOG.md b/CHANGELOG.md index 88edc9ba..9042a216 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,4 +75,7 @@ * update packages and support multiple device open same account ## 1.0.3 +* update packages + +## 1.0.4 * update packages \ No newline at end of file diff --git a/README.md b/README.md index 9cdb704b..49fcccf2 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,12 @@ VCHAT Documention
v_chat_sdk on pub.dev
+ Backend Code
+ ## Android Test -
+
## IOS Test Flight diff --git a/example/lib/screens/group_chat_info/group_chat_info.dart b/example/lib/screens/group_chat_info/group_chat_info.dart index a394e889..cddfc532 100644 --- a/example/lib/screens/group_chat_info/group_chat_info.dart +++ b/example/lib/screens/group_chat_info/group_chat_info.dart @@ -205,7 +205,7 @@ class _GroupChatInfoState extends State { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - members[index].mame.text, + members[index].name.text, members[index] .vChatUserGroupRole .inString diff --git a/lib/src/models/v_chat_group_user.dart b/lib/src/models/v_chat_group_user.dart index f018e811..4ea51d33 100644 --- a/lib/src/models/v_chat_group_user.dart +++ b/lib/src/models/v_chat_group_user.dart @@ -4,7 +4,7 @@ import 'package:v_chat_sdk/src/utils/v_chat_config.dart'; class VChatGroupUser { final String id; final String email; - final String mame; + final String name; final String image; final VChatUserGroupRole vChatUserGroupRole; @@ -13,7 +13,7 @@ class VChatGroupUser { const VChatGroupUser({ required this.id, required this.email, - required this.mame, + required this.name, required this.image, required this.vChatUserGroupRole, }); @@ -24,33 +24,33 @@ class VChatGroupUser { (other is VChatGroupUser && runtimeType == other.runtimeType && email == other.email && - mame == other.mame && + name == other.name && image == other.image && vChatUserGroupRole == other.vChatUserGroupRole); @override int get hashCode => email.hashCode ^ - mame.hashCode ^ + name.hashCode ^ image.hashCode ^ vChatUserGroupRole.hashCode; @override String toString() { - return 'VChatGroupUser{ id: $id, email: $email, mame: $mame, image: $image, vChatUserGroupRole: $vChatUserGroupRole,}'; + return 'VChatGroupUser{ id: $id, email: $email, mame: $name, image: $image, vChatUserGroupRole: $vChatUserGroupRole,}'; } VChatGroupUser copyWith({ String? id, String? email, - String? mame, + String? name, String? image, VChatUserGroupRole? vChatUserGroupRole, }) { return VChatGroupUser( id: id ?? this.id, email: email ?? this.email, - mame: mame ?? this.mame, + name: name ?? this.name, image: image ?? this.image, vChatUserGroupRole: vChatUserGroupRole ?? this.vChatUserGroupRole, ); @@ -60,7 +60,7 @@ class VChatGroupUser { return { '_id': id, 'email': email, - 'mame': mame, + 'mame': name, 'image': image, 'role': vChatUserGroupRole.inString, }; @@ -70,7 +70,7 @@ class VChatGroupUser { return VChatGroupUser( id: map['_id'] as String, email: map['email'] as String, - mame: map['name'] as String, + name: map['name'] as String, image: VChatConfig.profileImageBaseUrl + (map['imageThumb'] as String), vChatUserGroupRole: map['role'] == VChatUserGroupRole.admin.inString ? VChatUserGroupRole.admin diff --git a/lib/src/services/socket_service.dart b/lib/src/services/socket_service.dart index e5189f7d..50ccfdf9 100644 --- a/lib/src/services/socket_service.dart +++ b/lib/src/services/socket_service.dart @@ -26,21 +26,20 @@ class SocketService { bool get isConnected => _socket!.connected; Socket getSocket() { - return io(VChatConfig.serverIp, { - 'transports': ['websocket'], - 'pingTimeout': 5000, - 'connectTimeout': 5000, - 'pingInterval': 5000, - 'extraHeaders': { - 'Authorization': VChatAppService.instance.vChatUser!.accessToken, - "accept-language": VChatAppService.instance.currentLocal + return io( + VChatConfig.serverIp, + { + 'transports': ['websocket'], + 'pingTimeout': 5000, + 'connectTimeout': 5000, + 'pingInterval': 5000, + 'extraHeaders': { + 'Authorization': VChatAppService.instance.vChatUser!.accessToken, + "accept-language": VChatAppService.instance.currentLocal + }, + 'forceNew': true }, - 'forceNew': true - }); - } - - void emitRefreshChats() { - _socket!.emit("join"); + ); } void connectSocket() { diff --git a/pubspec.yaml b/pubspec.yaml index 8b9657f3..f1e4757c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: v_chat_sdk description: official sdk for v chat this is a complete chat ecosystem use flutter for clint node js and socket io for server side flutter chat v chat sdk -version: 1.0.3 +version: 1.0.4 homepage: https://github.com/hatemragab/v_chat_sdk environment: diff --git a/v_chat_theme_usage b/v_chat_theme_usage deleted file mode 100644 index 183da1cc..00000000 --- a/v_chat_theme_usage +++ /dev/null @@ -1,4 +0,0 @@ -scaffoldBackgroundColor = background color for rooms -h6 = user title and un readMessage -b1 = typing ,recording with green color -b2 = message time \ No newline at end of file