diff --git a/lib/src/packages/quill_markdown/delta_to_markdown.dart b/lib/src/packages/quill_markdown/delta_to_markdown.dart index 0803fabe..d3e7a33b 100644 --- a/lib/src/packages/quill_markdown/delta_to_markdown.dart +++ b/lib/src/packages/quill_markdown/delta_to_markdown.dart @@ -310,15 +310,15 @@ abstract class _NodeVisitor { extension _NodeX on Node { T accept(_NodeVisitor visitor, [T? context]) { switch (runtimeType) { - case Root: + case const (Root): return visitor.visitRoot(this as Root, context); - case Block: + case const (Block): return visitor.visitBlock(this as Block, context); - case Line: + case const (Line): return visitor.visitLine(this as Line, context); - case QuillText: + case const (QuillText): return visitor.visitText(this as QuillText, context); - case Embed: + case const (Embed): return visitor.visitEmbed(this as Embed, context); } throw Exception('Container of type $runtimeType cannot be visited');