diff --git a/example/lib/pages/home_page.dart b/example/lib/pages/home_page.dart index 69c9c8a6..fd0c0b7e 100644 --- a/example/lib/pages/home_page.dart +++ b/example/lib/pages/home_page.dart @@ -14,7 +14,6 @@ import 'package:flutter_quill_extensions/flutter_quill_extensions.dart'; import 'package:path/path.dart' as path; import 'package:path_provider/path_provider.dart'; -import '../universal_ui/universal_ui.dart'; import '../widgets/time_stamp_embed_widget.dart'; import 'read_only_page.dart'; @@ -221,7 +220,7 @@ class _HomePageState extends State { sizeSmall: TextStyle(fontSize: 9), ), embedBuilders: [ - ...defaultEmbedBuildersWeb, + ...FlutterQuillEmbeds.editorsWebBuilders(), TimeStampEmbedBuilderWidget() ], ), diff --git a/example/lib/pages/read_only_page.dart b/example/lib/pages/read_only_page.dart index 82b8185f..44c85b3f 100644 --- a/example/lib/pages/read_only_page.dart +++ b/example/lib/pages/read_only_page.dart @@ -6,7 +6,6 @@ import 'package:flutter_quill/extensions.dart'; import 'package:flutter_quill/flutter_quill.dart'; import 'package:flutter_quill_extensions/flutter_quill_extensions.dart'; -import '../universal_ui/universal_ui.dart'; import '../widgets/demo_scaffold.dart'; class ReadOnlyPage extends StatefulWidget { @@ -56,7 +55,7 @@ class _ReadOnlyPageState extends State { autoFocus: true, expands: false, padding: EdgeInsets.zero, - embedBuilders: defaultEmbedBuildersWeb, + embedBuilders: FlutterQuillEmbeds.editorsWebBuilders(), scrollable: true, ), scrollController: ScrollController(), diff --git a/example/lib/universal_ui/universal_ui.dart b/example/lib/universal_ui/universal_ui.dart index 9971b926..aa276dbc 100644 --- a/example/lib/universal_ui/universal_ui.dart +++ b/example/lib/universal_ui/universal_ui.dart @@ -1,7 +1,7 @@ library universal_ui; -import 'package:flutter_quill/flutter_quill.dart'; -import 'package:flutter_quill_extensions/flutter_quill_extensions.dart'; +// import 'package:flutter_quill/flutter_quill.dart'; +// import 'package:flutter_quill_extensions/flutter_quill_extensions.dart'; // import '../widgets/responsive_widget.dart'; // import 'fake_ui.dart' if (dart.library.html) 'real_ui.dart' as ui_instance; @@ -108,8 +108,8 @@ import 'package:flutter_quill_extensions/flutter_quill_extensions.dart'; // } // } -List get defaultEmbedBuildersWeb => [ - ...FlutterQuillEmbeds.editorsWebBuilders(), - // ImageEmbedBuilderWeb(), - // VideoEmbedBuilderWeb(), - ]; +// List get defaultEmbedBuildersWeb => [ +// ...FlutterQuillEmbeds.editorsWebBuilders(), +// // ImageEmbedBuilderWeb(), +// // VideoEmbedBuilderWeb(), +// ]; diff --git a/flutter_quill_extensions/lib/presentation/embeds/editor/image/image.dart b/flutter_quill_extensions/lib/presentation/embeds/editor/image/image.dart index 1c87a0f6..d54b9d42 100644 --- a/flutter_quill_extensions/lib/presentation/embeds/editor/image/image.dart +++ b/flutter_quill_extensions/lib/presentation/embeds/editor/image/image.dart @@ -84,7 +84,7 @@ class QuillEditorImageEmbedBuilder extends EmbedBuilder { imageSize = OptionalSize(width, height); image = Padding( padding: EdgeInsets.all(margin), - child: getQuillImageByImageSource( + child: getImageWidgetByImageSource( imageUrl, width: width, height: height, @@ -97,7 +97,7 @@ class QuillEditorImageEmbedBuilder extends EmbedBuilder { } if (imageSize == null) { - image = getQuillImageByImageSource( + image = getImageWidgetByImageSource( imageUrl, imageProviderBuilder: configurations.imageProviderBuilder, imageErrorWidgetBuilder: configurations.imageErrorWidgetBuilder, diff --git a/flutter_quill_extensions/lib/presentation/embeds/widgets/image.dart b/flutter_quill_extensions/lib/presentation/embeds/widgets/image.dart index e73226e2..a4f8f717 100644 --- a/flutter_quill_extensions/lib/presentation/embeds/widgets/image.dart +++ b/flutter_quill_extensions/lib/presentation/embeds/widgets/image.dart @@ -28,7 +28,7 @@ String getImageStyleString(QuillController controller) { return s ?? ''; } -Image getQuillImageByImageSource( +Image getImageWidgetByImageSource( String imageSource, { required ImageEmbedBuilderProviderBuilder? imageProviderBuilder, required ImageErrorWidgetBuilder? imageErrorWidgetBuilder,