TarekkMA / markdown_quill

Convert quill (Delta) fromat to and from markdown
MIT License
18 stars 41 forks source link

fix code analysis and support flutter_quill 9.1.0 #15

Closed jakubslaby09 closed 7 months ago

jakubslaby09 commented 8 months ago

Currently, the code doesn't pass static analysis. It looks to me like Text has been renamed to QuillText in the flutter_quill package in https://github.com/singerdmx/flutter-quill/commit/7c5a12b14009dcd30c4d8e05d7cfcbd76f92fa4b in the leaf.dart file.

Here are the flutter analyze errors:

  error • Undefined class 'Text' • lib/src/delta_to_markdown.dart:227:24 • undefined_class
  error • Undefined class 'Text' • lib/src/delta_to_markdown.dart:306:15 • undefined_class
  error • Case expressions must be constant • lib/src/delta_to_markdown.dart:320:12 • non_constant_case_expression
  error • Undefined name 'Text' • lib/src/delta_to_markdown.dart:320:12 • undefined_identifier
  error • The name 'Text' isn't a type, so it can't be used in an 'as' expression • lib/src/delta_to_markdown.dart:321:42 • cast_to_non_type

Changing Text to QuillText fixes all the errors above.

jakubslaby09 commented 8 months ago

I've just added another commit (to upgrade to flutter_quill: ^9.1.0) to my fork. Apparently, I forgot to make a separate branch for this pull request, so that commit is here as well. Hopefully it's of some use to the project.

TarekkMA commented 7 months ago

I've updated the code in #17 Thank you for your PR ❤️