diff --git a/lib/src/document/nodes/line.dart b/lib/src/document/nodes/line.dart index 6691b1b8..55bff13b 100644 --- a/lib/src/document/nodes/line.dart +++ b/lib/src/document/nodes/line.dart @@ -522,15 +522,15 @@ base class Line extends QuillContainer { final text = node.toPlainText(); if (text == Embed.kObjectReplacementCharacter) { final embed = node.value as Embeddable; - final provider = CopyCutServiceProvider.instance; - // By default getCopyCutAction just return the same operation - // returning Embed.kObjectReplacementCharacter for the buffer + final provider = CopyCutServiceProvider.instance; + // By default getCopyCutAction just return the same operation + // returning Embed.kObjectReplacementCharacter for the buffer final action = provider.getCopyCutAction(embed.type); final data = action?.call(embed.data); - if(data is String && data != Embed.kObjectReplacementCharacter){ + if (data is String && data != Embed.kObjectReplacementCharacter) { buffer.write(data); return remaining; - } else{ + } else { buffer.write(action?.call(data)); } return remaining - node.length; diff --git a/lib/src/editor_toolbar_controller_shared/copy_cut_service/copy_cut_service.dart b/lib/src/editor_toolbar_controller_shared/copy_cut_service/copy_cut_service.dart index 7c6c98ca..5f50859a 100644 --- a/lib/src/editor_toolbar_controller_shared/copy_cut_service/copy_cut_service.dart +++ b/lib/src/editor_toolbar_controller_shared/copy_cut_service/copy_cut_service.dart @@ -6,8 +6,8 @@ typedef CopyCutAction = Object? Function(dynamic data); /// For copy or cut actions from a Line (just for embeddable blocks) @immutable abstract class CopyCutService { - /// Get the CopyCutAction by the type - /// of the embeddable (this type is decided by + /// Get the CopyCutAction by the type + /// of the embeddable (this type is decided by /// the property type of that class) CopyCutAction? getCopyCutAction(String type); } diff --git a/lib/src/editor_toolbar_controller_shared/copy_cut_service/default_copy_cut_service.dart b/lib/src/editor_toolbar_controller_shared/copy_cut_service/default_copy_cut_service.dart index 1e2d3c4d..93ca75a4 100644 --- a/lib/src/editor_toolbar_controller_shared/copy_cut_service/default_copy_cut_service.dart +++ b/lib/src/editor_toolbar_controller_shared/copy_cut_service/default_copy_cut_service.dart @@ -4,7 +4,7 @@ import 'copy_cut_service.dart'; /// Default implementation for [CopyCutService] /// /// This implementation always return the default embed character -/// replacemenet ([\uFFFC]) to work with the embeds from the internal +/// replacemenet ([\uFFFC]) to work with the embeds from the internal /// flutter quill plugins class DefaultCopyCutService extends CopyCutService { @override