WhatsApp Reactions is a Flutter package that provides a customizable and smooth reaction popup, similar to WhatsApp's reaction feature. It allows users to select from a set of predefined emotions when reacting to content.
Add the following line to your pubspec.yaml
file:
dependencies:
flutter:
sdk: flutter
whatsapp_reactions: ^version_number
import 'package:flutter/material.dart';
import 'package:whatsapp_reactions/whatsapp_reactions.dart';
import 'package:whatsapp_reactions/scr/models/emotions.dart';
import 'package:whatsapp_reactions/scr/models/reaction_box_paramenters.dart';
import 'package:whatsapp_reactions/scr/widgets/reaction_box.dart';
void showReactionPopup(BuildContext context, Offset offset) {
Reactionpopup.showReaction(
context,
offset: offset,
handlePressed: (Emotions emotion) {
// Handle the selected emotion here.
print('Selected emotion: $emotion');
},
);
}
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('WhatsApp Reactions Demo')),
body: Center(
child: ElevatedButton(
onPressed: () {
final buttonOffset = Offset(100, 100); // Replace with your button's offset.
showReactionPopup(context, buttonOffset);
},
child: Text('Show Reaction Popup'),
),
),
),
));
}
void showReactionPopup(BuildContext context, Offset offset) {
Reactionpopup.showReaction(
context,
offset: offset,
handlePressed: (Emotions emotion) {
print('Selected emotion: $emotion');
},
);
}
We are thrilled to announce that the upcoming feature in My Awesome App is the "Builder" feature. This feature will revolutionize how you interact with the app.
- Create custom widgets effortlessly.
- Design your own unique user interfaces.
- Take control of app layout with ease.
Stay tuned for more updates on the "Builder" feature, which is coming soon!
We value your feedback and suggestions. If you have any questions or need assistance, please don't hesitate to contact our support team at [email protected].
Thank you for choosing My Package. We hope you enjoy using it!
© 2023 Whatapp_Reaction. All rights reserved. Images and content used in this document are for illustrative purposes only. Actual app features may vary.