Skip to content

Instantly share code, notes, and snippets.

@NishantDesai1306
Created June 29, 2019 09:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NishantDesai1306/77abe45c14aac836b68c370b4e6b7525 to your computer and use it in GitHub Desktop.
Save NishantDesai1306/77abe45c14aac836b68c370b4e6b7525 to your computer and use it in GitHub Desktop.
Get the location where user tapped on the search button
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