0 purchases
transparent image button
Transparent Image Button #
Explain #
This package is used to click on Transparent Image as a Gesture, but it's OnTap function works only when it was clicked on the image or photo itself not on the transparent parts.
How to use ? #
TransparentImageButton.assets(
"assets/images/egg.png",
width: 200,
opacityThreshold: 0.8,
onTapInside: () => print("You tapped the image."),
onTapOutside: () => print("You tapped outside the image."),
onHoverInside: () => print("You're hovering inside the image."),
onHoverOutside: () => print("You're hovering outside the image."),
),
copied to clipboard
Things ToDO #
✅ Image from Assets.
❌ Image from Network.
The idea #
The idea came to me from this question on Stackoverflow.
Sources that helped me #
How to Calculate the Coordinates of touch in Flutter?
Get the pixel on which I clicked
roipeker gist file
Contributors (Thanks for your GREAT work ❤️) #
Jordan: Added QoL improvements for Flutter web.
Issues or Contributions #
I am very welcoming any issues or contribution you can help me with.
License #
MIT: https://mit-license.org.
Copyright (c) 2019 Shady Boshra. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Find me on Stackoverflow #
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.