buildStatusContent method
Implementation
Widget buildStatusContent() {
if (data.messageStatus == ImMessageStatus.fail.name) {
return GestureDetector(
onTap: () {
debugPrint("");
itemClickStatus?.call(data);
},
child: const Padding(
padding: EdgeInsets.only(right: 8.0),
child: Icon(Icons.error, color: Colors.red),
),
);
} else if (data.messageStatus == ImMessageStatus.loading.name) {
return const Padding(
padding: EdgeInsets.only(right: 8.0),
child: CupertinoActivityIndicator(radius: 8),
);
} else if (data.messageStatus == ImMessageStatus.cancel.name) {
Widget tips = Text('${data.isSender! ? '你' : "对方"}撤回了一条消息',
style: CommonStyle.secondaryStyle
.copyWith(color: CommonColors.theme.shade300));
if (data.isSender! && data.messageType == ImMessageType.text.name) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
tips,
const SizedBox(width: 6),
GestureDetector(
onTap: () {
debugPrint("");
itemClickStatus?.call(data);
},
child: Text(
'重新编辑',
style: CommonStyle.secondaryStyle
.copyWith(color: Colors.blue.shade900.withOpacity(0.8)),
),
),
],
);
}
return tips;
} else {
return Container();
}
}