pip_mode 0.0.3 copy "pip_mode: ^0.0.3" to clipboard
pip_mode: ^0.0.3 copied to clipboard

The pip_mode plugin allows developers to send any widget into PiP mode, providing a seamless way to keep content visible while users navigate to other apps.

The pip_mode plugin to send any widget into Picture-in-Picture mode, providing a seamless way to keep content visible while users navigate to other apps.

Features #

  • Customizable Content: Encapsulate any widget and display it in PiP mode.
  • Video Conversion Support: Automatically converts widgets into a video for PiP.

pip_mode screenshot

Getting started #

Android #

  1. Open android > app > build.gradle and set minSDK to 24 or higher.
  2. Enable PiP support for MainActivity in AndroidManifest.xml.
<activity
    android:name=".MainActivity"
    ...
    android:supportsPictureInPicture="true"
    ...>

iOS #

  1. Set minimum deployment target to 12.1 or higher.
  2. Open ios > Runner > Info.plist and add below lines inside root <dict> to add Background Modes capability & enable Audio, Airplay, and Picture.
<key>UIBackgroundModes</key>
<array>
	<string>audio</string>
	<string>AirPlay</string>
	<string>picture-in-picture</string>
</array>
  1. For iOS, test on real device

Usage #

final _controller = PipController();

GestureDetector(
    onTap: _controller.startPipMode,
    child: PipWidget(
        controller: _controller,
        onInitialized: (success) => log('Pip Widget Initialized: $success'),
        child: Container(
            width: 200,
            height: 200,
            color: Colors.red,
            alignment: Alignment.center,
            child: Text('Hello World!'),
        ),
    ),
),

Additional information #

Think you've found a bug, or would like to see a new feature? We'd love to hear about it! Visit the Issues section of the git repository.

2
likes
140
points
45
downloads

Publisher

verified publishervalueoutput.com

Weekly Downloads

The pip_mode plugin allows developers to send any widget into PiP mode, providing a seamless way to keep content visible while users navigate to other apps.

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

ffmpeg_kit_flutter_min_gpl, flutter, http, path_provider, video_player

More

Packages that depend on pip_mode