Skip to content
pubscout

draggable_float_widget

0.1.0, released 3 years ago by an unverified publisher

A draggable floating widget that can hide/show based on ScrollView events.

WASM-ready
$ flutter pub add draggable_float_widget
Source repository

What it does

Provides a widget that can be dragged around the screen and positioned freely. It can automatically hide or show in response to scroll notifications via a StreamController.

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

Use it when

  • You need a movable overlay element that follows user interaction
  • You want the widget to appear/disappear with scrolling
  • You prefer a lightweight solution without extra dependencies

Skip it when

  • You need complex animations or physics beyond basic dragging
  • You require a fully featured UI kit or theming system

Strengths

  • Simple API with configurable base config
  • Works on all Flutter platforms
  • No external dependencies besides Flutter

Weaknesses

  • Limited to basic drag behavior, no advanced gestures
  • Visibility control relies on manual StreamController handling

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
NotificationListener(
  onNotification: (notification) {
    if (notification is ScrollStartNotification) {
      eventStreamController.add(OperateEvent.OPERATE_HIDE);
    } else if (notification is ScrollEndNotification) {
      eventStreamController.add(OperateEvent.OPERATE_SHOW);
    }
    return true;
  },
  child: Stack(
    children: [
      ListView(...),
      DraggableFloatWidget(
        child: YourChildWidget(),
        eventStreamController: eventStreamController,
        config: DraggableFloatWidgetBaseConfig(isFullScreen: false),
        onTap: () => print('Tapped'),
      ),
    ],
  ),
);

Alternatives

Packages that do the same job and could replace draggable_float_widget.