diff --git a/lib/widgets/editor.dart b/lib/widgets/editor.dart index 9d962d29..75ee0e52 100644 --- a/lib/widgets/editor.dart +++ b/lib/widgets/editor.dart @@ -83,7 +83,10 @@ Widget _defaultEmbedBuilder(BuildContext context, Embed node) { color: Colors.grey.shade200, ); case 'image': - return Image.network(node.value.data); + String imageUrl = node.value.data; + return imageUrl.startsWith('http') + ? Image.network(imageUrl) + : Image.asset(imageUrl); default: throw UnimplementedError( 'Embeddable type "${node.value.type}" is not supported by default embed '