PipWidget constructor
const
PipWidget({
- Key? key,
- dynamic onInitialized()?,
- required Widget child,
- required PipController controller,
A widget that allows the enclosing content to be sent into Picture-in-Picture (PiP) mode.
To use this widget, wrap your content with PipWidget
, pass a PipController
to manage the PiP behavior, and call startPipMode()
when needed.
Example:
final controller = PipController();
PipWidget(
controller: controller,
child: Center(child: Text("This is a demo widget")),
);
Implementation
const PipWidget({
super.key,
this.onInitialized,
required this.child,
required this.controller,
});