Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
rodydavis committed Apr 23, 2024
1 parent 131b209 commit ad824c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Expand Up @@ -4,6 +4,7 @@
"cachebase",
"colorpicker",
"computeds",
"datetime",
"endtemplate",
"Finalizer",
"Fruchterman",
Expand Down
9 changes: 5 additions & 4 deletions examples/node_based_editor/lib/editor.dart
Expand Up @@ -446,15 +446,16 @@ class _EditorState extends State<Editor> {
return color.withOpacity(0.1);
}(),
),
onWillAcceptWithDetails: (data) {
dragAccept.value = data != null;
onWillAcceptWithDetails: (details) {
// ignore: unnecessary_null_comparison
dragAccept.value = details.data != null;
return dragAccept();
},
onLeave: (_) {
dragAccept.value = false;
},
onAcceptWithDetails: (data) {
nodes[data] = draggableOffset()!;
onAcceptWithDetails: (details) {
nodes[details.data] = draggableOffset()!;
selection.clear();
},
),
Expand Down

0 comments on commit ad824c1

Please sign in to comment.