From 8ef1697409d45012b5c84142116c669a53b2600a Mon Sep 17 00:00:00 2001 From: singerdmx Date: Wed, 10 Feb 2021 09:50:03 -0800 Subject: [PATCH] Update README --- README.md | 8 +++++--- lib/widgets/editor.dart | 11 ++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e123d18e..64b92779 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ - + @@ -10,8 +11,9 @@ Rich text editor and a [Quill] component for [Flutter]. https://pub.dev/packages/flutter_quill This library is a WYSIWYG editor built for the modern mobile platform only and web is under development. - -To run the app on web do the following: + +Default branch `master` is on channel `master`. To use channel `stable`, switch to branch `stable`. +Branch `master` on channel `master` supports web. To run the app on web do the following: 1) Change flutter channel to master using `flutter channel master`, followed by `flutter upgrade`. 2) Enable web using `flutter config --enable-web` and restart the IDE. 3) Upon successful execution of step 1 and 2 you should see `Chrome` as one of the devices which you run `flutter devices`. diff --git a/lib/widgets/editor.dart b/lib/widgets/editor.dart index dd9784d2..89be0b58 100644 --- a/lib/widgets/editor.dart +++ b/lib/widgets/editor.dart @@ -78,14 +78,11 @@ Widget _defaultEmbedBuilder(BuildContext context, leaf.Embed node) { case 'image': if (kIsWeb) { return SizedBox.shrink(); - } else { - String imageUrl = node.value.data; - return imageUrl.startsWith('http') - ? Image.network(imageUrl) - : Image.asset(imageUrl); } - break; - + 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 '