mirror of
https://github.com/WuKongIM/WuKongIMFlutterSDK
synced 2025-05-24 11:22:20 +00:00
25 lines
597 B
Dart
25 lines
597 B
Dart
class UserInfo {
|
|
static String uid = '';
|
|
static String token = '';
|
|
}
|
|
|
|
class ChatChannel {
|
|
String channelID;
|
|
int channelType;
|
|
ChatChannel(this.channelID, this.channelType);
|
|
}
|
|
|
|
class CommonUtils {
|
|
static String getAvatar(String channelID) {
|
|
if (channelID == '') {
|
|
return '';
|
|
}
|
|
return channelID.substring(0, 1);
|
|
}
|
|
|
|
static String formatDateTime(int timestamp) {
|
|
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(timestamp * 1000);
|
|
return "${dateTime.year}-${dateTime.month}-${dateTime.day} ${dateTime.hour}:${dateTime.minute}:${dateTime.second}";
|
|
}
|
|
}
|