diff --git a/lib/widgets/editor.dart b/lib/widgets/editor.dart index 793ed54f..0be9bf4b 100644 --- a/lib/widgets/editor.dart +++ b/lib/widgets/editor.dart @@ -82,7 +82,7 @@ Widget _defaultEmbedBuilder(BuildContext context, Embed node) { color: Colors.grey.shade200, ); case 'image': - return _buildImage(context, node.value.data); + return Image.network(node.value.data); default: throw UnimplementedError( 'Embeddable type "${node.value.type}" is not supported by default embed ' @@ -91,21 +91,6 @@ Widget _defaultEmbedBuilder(BuildContext context, Embed node) { } } -Widget _buildImage(BuildContext context, String imageUrl) { - return GestureDetector( - child: Image.network(imageUrl), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - ImageTapWrapper(imageProvider: NetworkImage(imageUrl)), - ), - ); - }, - ); -} - class QuillEditor extends StatefulWidget { final QuillController controller; final FocusNode focusNode;