feat:增加消息功能
This commit is contained in:
@@ -8,12 +8,14 @@ import 'package:sweet_chat_app/utils/SpUtil.dart';
|
||||
import 'chat_page.dart';
|
||||
|
||||
class ContactInfo extends ISuspensionBean {
|
||||
final int id;
|
||||
final String name;
|
||||
final String avatar;
|
||||
String? tagIndex;
|
||||
String? namePinyin;
|
||||
|
||||
ContactInfo({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.avatar,
|
||||
this.tagIndex,
|
||||
@@ -58,6 +60,7 @@ class _ContactsPageState extends State<ContactsPage> {
|
||||
final tag = pinyin.substring(0, 1).toUpperCase();
|
||||
|
||||
return ContactInfo(
|
||||
id: user.id,
|
||||
name: user.nickname,
|
||||
avatar: user.avatarUrl,
|
||||
tagIndex: RegExp(r'^[A-Z]$').hasMatch(tag) ? tag : '#',
|
||||
@@ -163,6 +166,7 @@ class _ContactsPageState extends State<ContactsPage> {
|
||||
MaterialPageRoute(
|
||||
builder:
|
||||
(_) => ChatPage(
|
||||
contractId: contact.id,
|
||||
contactName: contact.name,
|
||||
avatarUrl: contact.avatar,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user