PipWidget constructor

const PipWidget({
  1. Key? key,
  2. dynamic onInitialized(
    1. bool
    )?,
  3. required Widget child,
  4. 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,
});