A Flutter Package Make Easier Drag and Drop Stack of Widgets

Overview

The package make easier drag and drop stack of widgets

Screen Recording 2023-11-18 at 22 14 15

Usage

  @override
  Widget build(BuildContext context) {
    return const Scaffold(
      body: Center(
        child: EasyDragAndDrop(
          initialPositions: [
            Offset(-100, 0),
            Offset(0, -100),
          ],
          width: 300,
          height: 300,
          items: [
            FlutterLogo(),
            FlutterLogo(),
          ],
        ),
      ),
    );
  }

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add easy_drag_and_drop

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  easy_drag_and_drop: ^0.0.5

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

Import it

Now in your Dart code, you can use:

import 'package:easy_drag_and_drop/easy_drag_and_drop.dart'; 

Download details:

Author: SonaHunanyan

Source: https://github.com/SonaHunanyan/easy_drag_and_drop

#flutter #drag #drop

 A Flutter Package Make Easier Drag and Drop Stack of Widgets
1.15 GEEK