How to use onTap and Draggable together in flutter?

0

I need a widget to receive the onTap event and is draggable.

child: GestureDetector(
    onTap: _setVisibleSelect(),
    child: Draggable<Color>(
      data: Color(0x000000ff),
      child: Image.asset('assets/photo.png', color: Colors.yellow, width: 60, height: 60,),
      feedback: Image.asset('assets/photo.png', color: Colors.yellow, width: 60, height: 60,),
      childWhenDragging: Container(),
      ),

I can see _setVisibleSelect() doesn't work when onTap but Dragging. How can I use two event together?

android
ios
flutter
dart
asked on Stack Overflow May 19, 2020 by nexdev • edited May 19, 2020 by srikanth7785

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0