Comments (3)
But don't you worry @isaanyoha, i've now just released HeartOverlay Version: 1.3.0
It has support for displaying any kind of widget instead of just icon
s, and that includes Text
to show your emojis.
HeartOverlay(
icon: const Text('✌️'),
size: 60,
verticalOffset: 20, // Vertical Offset from tap position
horizontalOffset: -10, // Horizontal Offset from tap position
duration: Duration(milliseconds: 800), // Icon to stay on screen duration
tapDownType: TapDownType.single, // The animation trigger type
onPressed: (numberOfHearts) {
// Do something with the number of hearts shown or do something whenever the icon appears
},
child: Image.asset('assets/image.png'), // Overlay container background
),
NOTE: please be aware that you might have to fiddle with the vertical and horizontal offsets to precisely align the widget to its tap position.
Make sure to close the issue if the issue has been resolved✌️ and check out the CHANGELOG for additional details and know more about the next release.
from heart_overlay.
Hello @isaanyoha, You're welcome! and I'm glad you're enjoying the package.
You can replace the heart icon with other icons using the following code:
HeartOverlay(
icon: const Icon(
Icons.add, // Replace with the desired emoji icon
color: Colors.purple,
size: 100,
),
),
As of my last update, directly using widgets (such as the Text
widget to put text or emojis) is not supported yet, but you can use the approach above to replace the heart icon with an icon of your choice.
For further updates and changes, make sure to check the CHANGELOG here, i'll be sure to add widget support soon as described on the [Next]
section in the change log.
Hope this answers your question! ✌️
from heart_overlay.
Thanks for the reply and update!
from heart_overlay.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heart_overlay.