Skip to content
pubscout

floating_draggable_widget

2.3.0, released 2 years ago by an unverified publisher

A Flutter widget that lets users drag any widget freely around the screen.

WASM-ready
$ flutter pub add floating_draggable_widget
Source repository

What it does

Allows developers to implement a floating widget that can be dragged freely across the screen. It supports physics-based animations, automatic alignment to screen edges, and an optional widget deletion zone.

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

Use it when

  • You want to implement floating action buttons or mini-players that users can drag around.
  • You need a widget that auto-aligns to the left or right side of the screen after dragging.
  • You require a deletion target zone when dragging widgets.

Skip it when

  • You need the widget to float over other native mobile applications outside your app.
  • You need automatic calculation of the parent widget's or floating widget's size.

Strengths

  • Supports physics-based animations and auto-alignment options.
  • Includes built-in widget deletion functionality.
  • Works with any custom widget.

Weaknesses

  • Does not float over other system apps.
  • Requires manual sizing for both parent and floating widgets.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
FloatingDraggableWidget(
  mainScreenWidget: Scaffold(
    appBar: AppBar(title: Text('Demo')),
    body: Center(child: Text('Body')),
  ),
  floatingWidget: FloatingActionButton(
    onPressed: () {},
    child: const Icon(Icons.add),
  ),
  floatingWidgetHeight: 40,
  floatingWidgetWidth: 40,
  dx: 200,
  dy: 300,
)

Alternatives

Packages that do the same job and could replace floating_draggable_widget.