Skip to content

Commit 734ef66

Browse files
committed
Update defaultEmbedBuilder
1 parent d07d397 commit 734ef66

File tree

1 file changed

+27
-31
lines changed

1 file changed

+27
-31
lines changed

lib/src/widgets/embeds/default_embed_builder.dart

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,33 @@ Widget defaultEmbedBuilder(
4141

4242
if (!readOnly && isMobile()) {
4343
// TODO: slider for width and height
44-
// return _menuOptionsForEditableImageInMobile(context, imageUrl, image);
44+
// return GestureDetector(
45+
// onTap: () {
46+
// showDialog(
47+
// context: context,
48+
// builder: (context) => Padding(
49+
// padding: const EdgeInsets.fromLTRB(50, 0, 50, 0),
50+
// child: SimpleDialog(
51+
// shape: const RoundedRectangleBorder(
52+
// borderRadius:
53+
// BorderRadius.all(Radius.circular(10))),
54+
// children: [
55+
// _SimpleDialogItem(
56+
// icon: Icons.settings_outlined,
57+
// color: Colors.lightBlueAccent,
58+
// text: 'Resize'.i18n,
59+
// onPressed: () {},
60+
// ),
61+
// _SimpleDialogItem(
62+
// icon: Icons.delete_forever_outlined,
63+
// color: Colors.red.shade200,
64+
// text: 'Remove'.i18n,
65+
// onPressed: () {},
66+
// )
67+
// ]),
68+
// ));
69+
// },
70+
// child: image);
4571
}
4672

4773
if (!readOnly || !isMobile() || isImageBase64(imageUrl)) {
@@ -66,36 +92,6 @@ Widget defaultEmbedBuilder(
6692
}
6793
}
6894

69-
Widget _menuOptionsForEditableImageInMobile(
70-
BuildContext context, String imageUrl, Image image) {
71-
return GestureDetector(
72-
onTap: () {
73-
showDialog(
74-
context: context,
75-
builder: (context) => Padding(
76-
padding: const EdgeInsets.fromLTRB(50, 0, 50, 0),
77-
child: SimpleDialog(
78-
shape: const RoundedRectangleBorder(
79-
borderRadius: BorderRadius.all(Radius.circular(10))),
80-
children: [
81-
_SimpleDialogItem(
82-
icon: Icons.settings_outlined,
83-
color: Colors.greenAccent,
84-
text: 'Resize'.i18n,
85-
onPressed: () {},
86-
),
87-
_SimpleDialogItem(
88-
icon: Icons.delete_forever_outlined,
89-
color: Colors.red.shade200,
90-
text: 'Remove'.i18n,
91-
onPressed: () {},
92-
)
93-
]),
94-
));
95-
},
96-
child: image);
97-
}
98-
9995
Widget _menuOptionsForReadonlyImage(
10096
BuildContext context, String imageUrl, Image image) {
10197
return GestureDetector(

0 commit comments

Comments
 (0)