lucky1213 4 years ago
parent
commit
569f12df84
2 changed files with 11 additions and 12 deletions
  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 View File

267
           'This is likely due to a bug in the library. Tried to compose change $change from $source.');
267
           'This is likely due to a bug in the library. Tried to compose change $change from $source.');
268
     }
268
     }
269
     // _controller.add(NotusChange(before, change, source));
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 View File

17
 /// Provides interface for embedding images into Zefyr editor.
17
 /// Provides interface for embedding images into Zefyr editor.
18
 // TODO: allow configuring image sources and related toolbar buttons.
18
 // TODO: allow configuring image sources and related toolbar buttons.
19
 @experimental
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
   /// Builds image widget for specified image [key].
27
   /// Builds image widget for specified image [key].
28
   ///
28
   ///
40
   /// Depending on your application returned key may represent a path to
40
   /// Depending on your application returned key may represent a path to
41
   /// an image file on user's device, an HTTP link, or an identifier generated
41
   /// an image file on user's device, an HTTP link, or an identifier generated
42
   /// by a file hosting service like AWS S3 or Google Drive.
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
   Future<String> picked(File file, bool isFullImage);
45
   Future<String> picked(File file, bool isFullImage);
46
 }
46
 }