LiveInfo constructor
LiveInfo({ - String liveID = '',
- String liveName = '',
- String notice = '',
- bool isMessageDisable = false,
- bool isPublicVisible = true,
- bool? isSeatEnabled,
- bool? keepOwnerOnSeat,
- int? maxSeatCount,
- TakeSeatMode seatMode = TakeSeatMode.apply,
- SeatLayoutTemplate seatTemplate = const VideoDynamicGrid9Seats(),
- int? seatLayoutTemplateID,
- String coverURL = '',
- String backgroundURL = '',
- List<int>? categoryList,
- int activityStatus = 0,
- LiveUserInfo? liveOwner,
- int createTime = 0,
- int totalViewerCount = 0,
- bool isGiftEnabled = true,
- 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 ?? {};