easy_pip 0.0.2

  • README.md
  • Example
  • Installing
  • Versions
  • 17


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.


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.0.2] - 31/07/2018

  • Corrected required params.
  • Fixed annotations.
  • Corrected examples.
  • Better documentation.


// 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.0.2

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter packages get

Alternatively, your editor might support flutter packages 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';
Version Uploaded Documentation Archive
0.0.2 Jul 31, 2018 Go to the documentation of easy_pip 0.0.2 Download easy_pip 0.0.2 archive
0.0.1 Jul 30, 2018 Go to the documentation of easy_pip 0.0.1 Download easy_pip 0.0.1 archive
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.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Health issues and suggestions

Document public APIs (-9.29 points)

13 out of 14 API elements (library, class, field or method) have no adequate dartdoc content. Good documentation improves code readability and discoverability through search.

Maintenance issues and suggestions

Add SDK constraint in pubspec.yaml. (-50 points)

For information about setting SDK constraint, please see https://www.dartlang.org/tools/pub/pubspec#sdk-constraints.

Package is pre-v0.1 release. (-10 points)

While there is nothing inherently wrong with versions of 0.0.*, it usually means that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies