Skip to content
pubscout

draggable_panel

5.0.0, released 5 days ago by shodev.live

A floating panel window that can be dragged, spring-snapped, parked off-edge, and tapped to grow.

WASM-readyUses material_ui
$ flutter pub add draggable_panel
Source repository

What it does

Provides a draggable floating panel window for Flutter that spring-snaps to the nearest edge based on momentum, can stash off-screen into a grab tab, and expands in place when tapped. It uses physics-based spring motion and supports gesture control.

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

Use it when

  • You need a floating picture-in-picture style player or mini-panel over your content.
  • You want panels that can snap to edges or stash off-screen into grab tabs.

Skip it when

  • Your app relies strictly on standard framework Material widgets without the standalone material_ui package.
  • You need a standard bottom sheet or modal dialog instead of a free-roaming floating window.

Strengths

  • High-performance motion driven directly inside a RenderBox without widget rebuilds during animation.
  • Calculates drop targets and spring physics based on actual momentum and Apple-inspired fluid interfaces.
  • Persists resting position as intent rather than raw pixels across layout changes.

Weaknesses

  • Requires the standalone material_ui package instead of standard package:flutter/material.dart.
  • expandedBuilder runs its layout up front, meaning expensive initialization inside the builder must be avoided.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Add draggable_panel and material_ui to pubspec.yaml. Mount the panel via MaterialApp.builder.

MaterialApp(
  builder: (context, child) => DraggablePanel(
    collapsedBuilder: (context, status) => const Icon(Icons.play_arrow),
    expandedBuilder: (context, status) => const MiniPlayer(),
    child: child,
  ),
  home: const HomeScreen(),
)

Alternatives

Packages that do the same job and could replace draggable_panel.

Works with

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