Update flutter_quill_extensions and example

pull/1508/head
Ellet 1 year ago
parent f0d011007e
commit a59f6e5e47
No known key found for this signature in database
GPG Key ID: C488CC70BBCEF0D1
  1. 3
      example/lib/pages/home_page.dart
  2. 3
      example/lib/pages/read_only_page.dart
  3. 14
      example/lib/universal_ui/universal_ui.dart
  4. 4
      flutter_quill_extensions/lib/presentation/embeds/editor/image/image.dart
  5. 2
      flutter_quill_extensions/lib/presentation/embeds/widgets/image.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<HomePage> {
sizeSmall: TextStyle(fontSize: 9),
),
embedBuilders: [
...defaultEmbedBuildersWeb,
...FlutterQuillEmbeds.editorsWebBuilders(),
TimeStampEmbedBuilderWidget()
],
),

@ -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<ReadOnlyPage> {
autoFocus: true,
expands: false,
padding: EdgeInsets.zero,
embedBuilders: defaultEmbedBuildersWeb,
embedBuilders: FlutterQuillEmbeds.editorsWebBuilders(),
scrollable: true,
),
scrollController: ScrollController(),

@ -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<EmbedBuilder> get defaultEmbedBuildersWeb => [
...FlutterQuillEmbeds.editorsWebBuilders(),
// ImageEmbedBuilderWeb(),
// VideoEmbedBuilderWeb(),
];
// List<EmbedBuilder> get defaultEmbedBuildersWeb => [
// ...FlutterQuillEmbeds.editorsWebBuilders(),
// // ImageEmbedBuilderWeb(),
// // VideoEmbedBuilderWeb(),
// ];

@ -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,

@ -28,7 +28,7 @@ String getImageStyleString(QuillController controller) {
return s ?? '';
}
Image getQuillImageByImageSource(
Image getImageWidgetByImageSource(
String imageSource, {
required ImageEmbedBuilderProviderBuilder? imageProviderBuilder,
required ImageErrorWidgetBuilder? imageErrorWidgetBuilder,

Loading…
Cancel
Save