From 734ef66e58cb69b3ab2de4c701ed6b372c51e3d7 Mon Sep 17 00:00:00 2001 From: X Code Date: Mon, 31 Jan 2022 01:49:17 -0800 Subject: [PATCH] Update defaultEmbedBuilder --- .../widgets/embeds/default_embed_builder.dart | 58 +++++++++---------- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/lib/src/widgets/embeds/default_embed_builder.dart b/lib/src/widgets/embeds/default_embed_builder.dart index 0aeb7dde..00b62d07 100644 --- a/lib/src/widgets/embeds/default_embed_builder.dart +++ b/lib/src/widgets/embeds/default_embed_builder.dart @@ -41,7 +41,33 @@ Widget defaultEmbedBuilder( if (!readOnly && isMobile()) { // TODO: slider for width and height - // return _menuOptionsForEditableImageInMobile(context, imageUrl, image); + // return GestureDetector( + // onTap: () { + // showDialog( + // context: context, + // builder: (context) => Padding( + // padding: const EdgeInsets.fromLTRB(50, 0, 50, 0), + // child: SimpleDialog( + // shape: const RoundedRectangleBorder( + // borderRadius: + // BorderRadius.all(Radius.circular(10))), + // children: [ + // _SimpleDialogItem( + // icon: Icons.settings_outlined, + // color: Colors.lightBlueAccent, + // text: 'Resize'.i18n, + // onPressed: () {}, + // ), + // _SimpleDialogItem( + // icon: Icons.delete_forever_outlined, + // color: Colors.red.shade200, + // text: 'Remove'.i18n, + // onPressed: () {}, + // ) + // ]), + // )); + // }, + // child: image); } if (!readOnly || !isMobile() || isImageBase64(imageUrl)) { @@ -66,36 +92,6 @@ Widget defaultEmbedBuilder( } } -Widget _menuOptionsForEditableImageInMobile( - BuildContext context, String imageUrl, Image image) { - return GestureDetector( - onTap: () { - showDialog( - context: context, - builder: (context) => Padding( - padding: const EdgeInsets.fromLTRB(50, 0, 50, 0), - child: SimpleDialog( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(10))), - children: [ - _SimpleDialogItem( - icon: Icons.settings_outlined, - color: Colors.greenAccent, - text: 'Resize'.i18n, - onPressed: () {}, - ), - _SimpleDialogItem( - icon: Icons.delete_forever_outlined, - color: Colors.red.shade200, - text: 'Remove'.i18n, - onPressed: () {}, - ) - ]), - )); - }, - child: image); -} - Widget _menuOptionsForReadonlyImage( BuildContext context, String imageUrl, Image image) { return GestureDetector(