From 68de127c034bff442b3125bf24ec5793f74cfe3c Mon Sep 17 00:00:00 2001 From: CatHood0 Date: Thu, 25 Jul 2024 06:18:08 -0400 Subject: [PATCH] fix: removed unnecessary optional return for CopyCutAction --- .../copy_cut_service/copy_cut_service.dart | 2 +- .../copy_cut_service/default_copy_cut_service.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 5f50859a..81dc77a3 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 @@ -9,5 +9,5 @@ abstract class CopyCutService { /// Get the CopyCutAction by the type /// of the embeddable (this type is decided by /// the property type of that class) - CopyCutAction? getCopyCutAction(String type); + 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 93ca75a4..5b2469bb 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 @@ -8,7 +8,7 @@ import 'copy_cut_service.dart'; /// flutter quill plugins class DefaultCopyCutService extends CopyCutService { @override - CopyCutAction? getCopyCutAction(String type) { + CopyCutAction getCopyCutAction(String type) { return (data) => Embed.kObjectReplacementCharacter; } }