Created
June 29, 2019 09:05
-
-
Save NishantDesai1306/77abe45c14aac836b68c370b4e6b7525 to your computer and use it in GitHub Desktop.
Get the location where user tapped on the search button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double rippleStartX, rippleStartY; | |
void onSearchTapUp(TapUpDetails details) { | |
setState(() { | |
rippleStartX = details.globalPosition.dx; | |
rippleStartY = details.globalPosition.dy; | |
}); | |
print("pointer location $rippleStartX, $rippleStartY"); | |
} | |
// in render method | |
GestureDetector( | |
child: IconButton( | |
icon: Icon( | |
Icons.search, | |
color: Colors.white, | |
), | |
), | |
onTapUp: onSearchTapUp, | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment