Update delta_to_markdown

pull/1602/head
Ellet 1 year ago
parent 3a41fc92e2
commit 4052779cfe
No known key found for this signature in database
GPG Key ID: C488CC70BBCEF0D1
  1. 10
      lib/src/packages/quill_markdown/delta_to_markdown.dart

@ -310,15 +310,15 @@ abstract class _NodeVisitor<T> {
extension _NodeX on Node { extension _NodeX on Node {
T accept<T>(_NodeVisitor<T> visitor, [T? context]) { T accept<T>(_NodeVisitor<T> visitor, [T? context]) {
switch (runtimeType) { switch (runtimeType) {
case Root: case const (Root):
return visitor.visitRoot(this as Root, context); return visitor.visitRoot(this as Root, context);
case Block: case const (Block):
return visitor.visitBlock(this as Block, context); return visitor.visitBlock(this as Block, context);
case Line: case const (Line):
return visitor.visitLine(this as Line, context); return visitor.visitLine(this as Line, context);
case QuillText: case const (QuillText):
return visitor.visitText(this as QuillText, context); return visitor.visitText(this as QuillText, context);
case Embed: case const (Embed):
return visitor.visitEmbed(this as Embed, context); return visitor.visitEmbed(this as Embed, context);
} }
throw Exception('Container of type $runtimeType cannot be visited'); throw Exception('Container of type $runtimeType cannot be visited');

Loading…
Cancel
Save