I'm developing a chat application which allows users to reply to others' messages. I want to make it so that when user long pressed a chat bubble, a dialog will appear directly on top of the bubble with the options to either reply or forward. I tried using showDialog, but the dialog always appears in the center. Is there any way to do this with flutter? Any help will be appreciated.
Asked
Active
Viewed 989 times
4 Answers
1
You can use show aligned dialog.

Sulaymon Ne'matov
- 428
- 1
- 9
-
This works, but focused_menu is closer to what I need. But still, thank you so much :D – treble18 Jul 22 '22 at 12:23
-
1

Anand
- 4,355
- 2
- 35
- 45
-
This works, but focused_menu is closer to what I needed. But still, thank you so much :D – treble18 Jul 22 '22 at 12:23
0
Make custom dialog by giving scaffold a transperant background. pass your custom widget to the body, align it wherever you want
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.8),
context: context,
barrierDismissible: false,
barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel,
transitionDuration: const Duration(milliseconds: 200),
pageBuilder: (context, animation1, animation2) {
return Scaffold(
body:CustomWidgetDialog(),
);
},
);

Ninad7N
- 544
- 4
- 13