CreateStatusRequest constructor
CreateStatusRequest({
- required CreateStatusRequestType type,
- TextStatus? text,
- PollStatus? poll,
- MediaStatus? media,
Implementation
CreateStatusRequest({required this.type, this.text, this.poll, this.media})
: assert(
(type == CreateStatusRequestType.text && text != null) ||
(type == CreateStatusRequestType.poll && poll != null) ||
(type == CreateStatusRequestType.media && media != null),
'The attribute matching the type must have a value',
);