easy_pip 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 84

easy_pip #

A widget for creating a Picture-In-Picture interface in Flutter. Note that this is not a plugin for enabling the PIP mode in Android. EasyPIP makes it easy to construct a YouTube like interface in Flutter.

Usage #

Import the package #

To use this package, add easy_pip as a dependency in your pubspec.yaml

Use the package #

import 'package:easy_pip/easy_pip.dart';

The main widget to use is PIPStack.

The PIPStack has three elements:

  1. Background Widget (Displays behind the pip widget)
  2. PIP Widget (The widget which shrinks to go into PIP mode)
  3. PIP Expanded Content (The content below the PIP widget when the widget is expanded)

Important: The pipEnabled field needs to be set to 'true' to make the pipWindow visible.

Note: If the pipExpandedContent field is left blank, the pipWidget will fill the entire screen when expanded.

Taking an analogy of the YouTube app:

The backgroundWidget would be the master list of all videos.

The pipWidget would be the video player which would be shrinkable and expandable.

The pipExpandedContent would be the list of recommended videos.

Getting Started #

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

[0.1.0] - 31/07/2018

  • Dart 2 support


// Copyright 2017 Deven Joshi. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:easy_pip/easy_pip.dart';

void main() {
  runApp(new MaterialApp(
    home: new MyHomePage(),

class MyHomePage extends StatefulWidget {
  _MyHomePageState createState() => new _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {
  var isEnabled = true;

  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(),
      body: PIPStack(
        backgroundWidget: Center(
          child: RaisedButton(
            onPressed: () {
              setState(() {
                isEnabled = !isEnabled;
            child: Text("Click here to enable PIP"),
        pipWidget: isEnabled
            ? Container(
          color: Colors.pink,
            : Container(),
        pipEnabled: isEnabled,
        pipExpandedContent: Card(
          color: Colors.white,
          child: Column(
            children: <Widget>[Text("Hello World"), Row()],
        onClosed: () {
          setState(() {
            isEnabled = !isEnabled;

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  easy_pip: ^0.1.0

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:easy_pip/easy_pip.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 25, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5


Package Constraint Resolved Available
Direct dependencies
Dart SDK >2.0.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies