LiveInfo constructor

LiveInfo({
  1. String liveID = '',
  2. String liveName = '',
  3. String notice = '',
  4. bool isMessageDisable = false,
  5. bool isPublicVisible = true,
  6. bool? isSeatEnabled,
  7. bool? keepOwnerOnSeat,
  8. int? maxSeatCount,
  9. TakeSeatMode seatMode = TakeSeatMode.apply,
  10. SeatLayoutTemplate seatTemplate = const VideoDynamicGrid9Seats(),
  11. int? seatLayoutTemplateID,
  12. String coverURL = '',
  13. String backgroundURL = '',
  14. List<int>? categoryList,
  15. int activityStatus = 0,
  16. LiveUserInfo? liveOwner,
  17. int createTime = 0,
  18. int totalViewerCount = 0,
  19. bool isGiftEnabled = true,
  20. Map<String, String>? metaData,
})

Implementation

LiveInfo({
  this.liveID = '',
  this.liveName = '',
  this.notice = '',
  this.isMessageDisable = false,
  this.isPublicVisible = true,
  bool? isSeatEnabled,
  bool? keepOwnerOnSeat,
  int? maxSeatCount,
  this.seatMode = TakeSeatMode.apply,
  this.seatTemplate = const VideoDynamicGrid9Seats(),
  int? seatLayoutTemplateID,
  this.coverURL = '',
  this.backgroundURL = '',
  List<int>? categoryList,
  this.activityStatus = 0,
  LiveUserInfo? liveOwner,
  this.createTime = 0,
  this.totalViewerCount = 0,
  this.isGiftEnabled = true,
  Map<String, String>? metaData,
})  : isSeatEnabled = LiveInfoExtension.getSeatConfiguration(seatTemplate).isSeatEnabled,
      maxSeatCount = (maxSeatCount == null || maxSeatCount == 0)
          ? (LiveInfoExtension.getSeatConfiguration(seatTemplate).maxSeatCount ?? 0)
          : maxSeatCount,
      seatLayoutTemplateID = (seatLayoutTemplateID == null || seatLayoutTemplateID == 600)
          ? LiveInfoExtension.getSeatConfiguration(seatTemplate).seatLayoutTemplateID
          : seatLayoutTemplateID,
      keepOwnerOnSeat =
          keepOwnerOnSeat ?? LiveInfoExtension.getSeatConfiguration(seatTemplate).keepOwnerOnSeat ?? false,
      categoryList = categoryList ?? [],
      liveOwner = liveOwner ?? LiveUserInfo(),
      metaData = metaData ?? {};