type property
Message type identifier.
This type categorizes the content payload (e.g., text, image, command) and
is used to determine how to parse the message-specific fields (text, command, etc.).
Generated via i2s() (integer to string) function (e.g., 0 → "0").
Implementation
@override
String get type {
if (_type == null) {
var helper = sharedMessageExtensions.helper;
_type = helper!.getContentType(super.toMap()) ?? '';
// _type = getInt('type', 0);
assert(_type != null, 'message type error: ${super.toMap()}');
}
return _type ?? '';
}