fileSizeStr property
String
get
fileSizeStr
Implementation
String get fileSizeStr {
int? length;
if (bodyType == MessageType.IMAGE) {
length = (body as ImageMessageBody).fileSize;
} else if (bodyType == MessageType.VOICE) {
length = (body as VoiceMessageBody).fileSize;
} else if (bodyType == MessageType.VIDEO) {
length = (body as VideoMessageBody).fileSize;
} else if (bodyType == MessageType.FILE) {
length = (body as FileMessageBody).fileSize;
} else {
length = 0;
}
return ChatUIKitFileSizeTool.fileSize(length!);
}