This project demonstrates the use of the new, in Flutter 1.20

Overview

Know where you drag & drop!

This project demonstrates the use of the new, in Flutter 1.20, onAcceptWithDetails callback on DragTarget. It enables you to determine the coordinates of the drop.

Before Flutter 1.20, these coordinates were only available from the Draggable.onDragEnd(details) callback. Getting the drop coordinates (say, for use in painting in/around your DragTarget) was:

  • awkward if the Draggable did not have the same parent as your DragTarget; you would have to store the coordinates somewhere and notify another widget where to find them.
  • impossible if the Draggable no longer exists when the drop occurs. For example, if a panel containing the Draggable animates off-screen before the user drops the feedback widget.

The example shows usage to paint the last drop position on the DragTarget.

Demo app screenshot

You might also like...

Flutter-Day-02 - A new Flutter project with Animation

Flutter-Day-02 - A new Flutter project with Animation

day02 A new Flutter project with Animation. Learn About Animation Page View Scre

Jan 10, 2022

Starting template for a new Flutter project. Using clean architecture + Riverpod.

flutter_project_template_riverpod Installation Add Flutter to your machine Open this project folder with Terminal/CMD Ensure there's no cache/build le

Dec 27, 2022

call_them_app: A new Flutter project.

 call_them_app: A new Flutter project.

call_them_app A new Flutter project. CONTRIBUTE Features that are yet to be added categorize posts make it so that it can be used for multiple posts m

Nov 3, 2021

A new flutter package project which contains lots of beautiful alert dialog that will help you lot to create beautiful awesome alert box very quickly and easily.

A new flutter package project which contains lots of beautiful alert dialog that will help you lot to create beautiful awesome alert box very quickly and easily.

A new flutter package project which contains lots of beautiful alert dialog that will help you lot to create beautiful awesome alert box very quickly and easily.

Jan 8, 2022

A new Flutter project for PC to control mobiles by adb tool.

mobile_controller A new Flutter project for PC to control mobiles by adb tool. Develop in progress, not release yet... Features Provide computer contr

Nov 15, 2022

Flutter_Wallpaper - A new Flutter project Wallt UI

Flutter_Wallpaper  - A new Flutter project Wallt UI

wallpaperr A new Flutter project Wallt UI Wallpaper : Useing Api Animation Serach page Splash screen You can download images You can use image for bac

Feb 21, 2022

Automatically create a new Flutter project with Getx & Directories

Automatically create a new Flutter project with Getx & Directories

Flucreator You can use Flucreator to create a new Flutter project. Automatically create a new Flutter project with Getx & Directories. 💻 Normal Usa

Jul 8, 2022

Clean architecture template project for new flutter applications.

Clean architecture template project for new flutter applications.

clean_template Clean architecture template project for new flutter applications. Implemented app logic RestClient - rest API client-server networking

Jul 27, 2022

A new Flutter project for finding movie and its details

A new Flutter project for finding movie and its details

movie_finder A new Flutter project for finding movie and its details. Project Screenshots Home Page Movie Detail Page #Project pages Home Page - Done

May 22, 2022
Comments
  • how to get position if dragtarget is list

    how to get position if dragtarget is list

    if Dragtarget is listview then when drop the item how can we put that item on that index on which that item dragged.

    for example. if dragitem 5 is dragged to list(DragTarget)'s item at 1st index then this item 5 will be at index 1 as its dropped on it.

    opened by mehtahardikr 2
Owner
Daniel Iglesia
Daniel Iglesia
Demonstrates how to use the pdftron flutter plugin

read_pdf_and_edit_with_pdftron_package Demonstrates how to use the pdftron_flutter plugin. Getting Started This project is a starting point for a Flut

Ahmed Abdelkader Khedr 0 Jan 16, 2022
Demonstrates how to use the awesome_notifications plugin

awesome_notifications_example Demonstrates how to use the awesome_notifications plugin. Getting Started This project is a starting point for a Flutter

null 1 Jun 18, 2022
Project demonstrates building a simple chat application using Flutter framework and Firebase cloud

Flutter Chat on Firebase Project demonstrates building a simple chat application using Flutter framework and Firebase cloud. App does not poll for new

Sukitha Udugamasooriya 8 Feb 2, 2022
Pokedex-Flutter - Pokedex demonstrates modern Flutter development with GetX, Hive, Flow, Adaptive/Responsive Design

Pokedex-Flutter Pokedex demonstrates modern Flutter development with GetX, Hive,

Khoujani 3 Aug 17, 2022
The Flutter app demonstrates displaying data in a weekly format.

Flutter weekly chart The Flutter app demonstrates displaying data in a weekly format. I came across this kind of screen in the app that I have been wo

BenBoonya 27 Jan 2, 2023
Demonstrates BLoC pattern in Flutter

bloc_test A real-world example of using the BLoC pattern in Flutter. This app features a searchable list of users and demonstrates an elegant way to k

First Floor Software 1 Jul 1, 2019
Fwitter is an example application that demonstrates the features and functionality of Fauna.

A full introduction to this project can be found in the docs. This project is an example of how to build a 'real-world' app with highly dynamic data i

Fauna Labs 291 Dec 13, 2022
A new Flutter project. Use of Padding Class(Widget) and Card Class (Widget)

Use_Of_Card_And_Padding_Class A new Flutter project. Use of Padding Class(Widget) and Card Class (Widget) Getting Started This project is a starting p

Avinandan Bose 1 Mar 18, 2022
A fast start flutter project to make aps faster and skip setup on every application. I am personally using this structure while creating a new project

Flutter Fast Start A fast start flutter project to make apps faster and skip setup on every application. I am personally using this structure while cr

Okan Demir 2 Dec 15, 2022
Flutter ui boilerplate is easiest way to create new flutter project with clean code and well organized file folder.

Flutter UI Boilerplate "Sharing for fun" Flutter ui boilerplate is easiest way to create new flutter project with clean code and well organized file f

Dimas Ibnu Malik 122 Dec 1, 2022