Skip to content
pubscout

floating

6.0.0, released 2 years ago by wrbl.xyz

Picture in Picture mode management for Flutter on Android.

WASM-ready
$ flutter pub add floating
Source repository

What it does

Allows Flutter apps on Android to enter and manage Picture-in-Picture (PiP) mode. It provides a helper PiPSwitcher widget to toggle UI elements based on PiP status and methods to check availability and enable PiP.

AI-written summary of version 6.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a video player or call app that needs Picture-in-Picture support on Android
  • You need to conditionally render different widgets depending on whether the app is in PiP mode

Skip it when

  • Your target platform includes iOS or web, as PiP is Android-only here
  • You do not need native Picture-in-Picture functionality

Strengths

  • Provides a ready-to-use PiPSwitcher widget for easy UI toggling
  • Supports customizable aspect ratios and source rect hints for smooth transitions

Weaknesses

  • Only available on Android
  • Requires manual native AndroidManifest configuration

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
0

Add android:supportsPictureInPicture="true" to the activity tag in AndroidManifest.xml.

PiPSwitcher(
    childWhenDisabled: Scaffold(...),
    childWhenEnabled: JustVideo(), 
)

Works with

Packages commonly used together with floating: ones it builds on, ones built on it, and its own family.