lucky1213 4 年前
父节点
当前提交
569f12df84
共有 2 个文件被更改,包括 11 次插入12 次删除
  1. 5
    6
      packages/notus/lib/src/document.dart
  2. 6
    6
      packages/zefyr/lib/src/widgets/image.dart

+ 5
- 6
packages/notus/lib/src/document.dart 查看文件

@@ -267,12 +267,11 @@ class NotusDocument {
267 267
           'This is likely due to a bug in the library. Tried to compose change $change from $source.');
268 268
     }
269 269
     // _controller.add(NotusChange(before, change, source));
270
-    final notusChange = NotusChange(before, change, source);
271
-    _controller.add(notusChange);
272
-    if (history != true && search != true) _history?.handleDocChange(notusChange);
273
-    // if (search != true) {
274
-    //   _searchController = NotusSearch(_delta);
275
-    // }
270
+    if (search != true) {
271
+      final notusChange = NotusChange(before, change, source);
272
+      _controller.add(notusChange);
273
+      if (history != true) _history?.handleDocChange(notusChange);
274
+    }
276 275
   }
277 276
 
278 277
   //

+ 6
- 6
packages/zefyr/lib/src/widgets/image.dart 查看文件

@@ -17,12 +17,12 @@ import 'editable_box.dart';
17 17
 /// Provides interface for embedding images into Zefyr editor.
18 18
 // TODO: allow configuring image sources and related toolbar buttons.
19 19
 @experimental
20
-abstract class ZefyrImageDelegate<S> {
21
-  /// Unique key to identify camera source.
22
-  S get cameraSource;
20
+abstract class ZefyrImageDelegate {
21
+  // /// Unique key to identify camera source.
22
+  // S get cameraSource;
23 23
 
24
-  /// Unique key to identify gallery source.
25
-  S get gallerySource;
24
+  // /// Unique key to identify gallery source.
25
+  // S get gallerySource;
26 26
 
27 27
   /// Builds image widget for specified image [key].
28 28
   ///
@@ -40,7 +40,7 @@ abstract class ZefyrImageDelegate<S> {
40 40
   /// Depending on your application returned key may represent a path to
41 41
   /// an image file on user's device, an HTTP link, or an identifier generated
42 42
   /// by a file hosting service like AWS S3 or Google Drive.
43
-  Future<String> pickImage(S source);
43
+  // Future<String> pickImage(S source);
44 44
 
45 45
   Future<String> picked(File file, bool isFullImage);
46 46
 }