CreateStatusRequest constructor

CreateStatusRequest({
  1. required CreateStatusRequestType type,
  2. TextStatus? text,
  3. PollStatus? poll,
  4. 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',
    );