Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onItemTap exception #9

Closed
ProerMo opened this issue Feb 10, 2023 · 2 comments
Closed

onItemTap exception #9

ProerMo opened this issue Feb 10, 2023 · 2 comments

Comments

@ProerMo
Copy link

ProerMo commented Feb 10, 2023

hey bro,I set onItemTap listener,it not works and got exception,maybe you use wrong data in that line.

onTap: onTap == null ? null : () => onTap!(item),

my exception

E/flutter ( 6743): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'TreeNode<BusinessTreeNode<dynamic>>' is not a subtype of type 'BusinessTreeNode<dynamic>'
E/flutter ( 6743): #0      ExpandableNodeItem.build.<anonymous closure> (package:animated_tree_view/tree_view/expandable_node.dart:51:49)
E/flutter ( 6743): #1      _ExpandableNodeContainer.build.<anonymous closure> (package:animated_tree_view/tree_view/expandable_node.dart:93:51)
E/flutter ( 6743): #2      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:253:24)
E/flutter ( 6743): #3      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:627:11)
E/flutter ( 6743): #4      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:306:5)
@jawwad-hassan89
Copy link
Contributor

Hi bro, yes you are correct, this is a bug due to type mismatch in the onTap callback. I will fix it with my next update in a couple of days.

@ProerMo
Copy link
Author

ProerMo commented Feb 11, 2023

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants