ZegoLayout.pictureInPicture constructor
ZegoLayout.pictureInPicture({
- EdgeInsets? smallViewMargin,
- bool isSmallViewDraggable = true,
- bool switchLargeOrSmallViewByClick = true,
- ZegoViewPosition smallViewPosition = ZegoViewPosition.topRight,
- Size? smallViewSize,
- EdgeInsets? spacingBetweenSmallViews,
- bool isSmallViewsScrollable = true,
- int visibleSmallViewsCount = 3,
- bool showNewScreenSharingViewInFullscreenMode = true,
- ZegoShowFullscreenModeToggleButtonRules showScreenSharingFullscreenModeToggleButtonRules = ZegoShowFullscreenModeToggleButtonRules.showWhenScreenPressed,
Picture-in-Picture (PiP) layout.
Implementation
factory ZegoLayout.pictureInPicture({
/// the margin of PIP view
/// todo@3.0 rename to margin
EdgeInsets? smallViewMargin,
/// small video view is draggable if set true in one-on-one mode
bool isSmallViewDraggable = true,
/// whether you can switch view's position by clicking on the small view
bool switchLargeOrSmallViewByClick = true,
/// whether to hide the local View when the local camera is closed
ZegoViewPosition smallViewPosition = ZegoViewPosition.topRight,
/// the size of every small view
Size? smallViewSize,
/// the space between small views in multi-users mode
/// todo@3.0 rename to paddings
EdgeInsets? spacingBetweenSmallViews,
/// small video views is scrollable if set true in multi-users mode
bool isSmallViewsScrollable = true,
/// the visible small views count in multi-users mode
/// if the value is set to -1, it will attempt to display the maximum number of views.
int visibleSmallViewsCount = 3,
///
bool showNewScreenSharingViewInFullscreenMode = true,
///
ZegoShowFullscreenModeToggleButtonRules showScreenSharingFullscreenModeToggleButtonRules =
ZegoShowFullscreenModeToggleButtonRules.showWhenScreenPressed,
}) {
return ZegoLayoutPictureInPictureConfig(
margin: smallViewMargin,
isSmallViewDraggable: isSmallViewDraggable,
switchLargeOrSmallViewByClick: switchLargeOrSmallViewByClick,
smallViewPosition: smallViewPosition,
smallViewSize: smallViewSize,
spacingBetweenSmallViews: spacingBetweenSmallViews,
isSmallViewsScrollable: isSmallViewsScrollable,
visibleSmallViewsCount: visibleSmallViewsCount,
showNewScreenSharingViewInFullscreenMode:
showNewScreenSharingViewInFullscreenMode,
showScreenSharingFullscreenModeToggleButtonRules:
showScreenSharingFullscreenModeToggleButtonRules,
);
}