csells / flutter_ai_toolkit

A set of AI chat-related widgets for Flutter
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
33 stars 6 forks source link

bug: need to fill in the MarkdownStyleSheet decorations #66

Open csells opened 2 weeks ago

csells commented 2 weeks ago

The LlmMessageStyle has embedded a MarkdownStyleSheet. It has values for the important things except these four decorations:

These should be set in the lightStyles method and inverted in the darkStyles method like so:

        blockquoteDecoration:
            sh.invertDecoration(markdownStyle.blockquoteDecoration),
        codeblockDecoration:
            sh.invertDecoration(markdownStyle.codeblockDecoration),
        horizontalRuleDecoration:
            sh.invertDecoration(markdownStyle.horizontalRuleDecoration),
        tableCellsDecoration:
            sh.invertDecoration(markdownStyle.tableCellsDecoration),

Otherwise, when these decorations are used, they'll be whatever default they are and not a) match the styles of the LlmChatView but then won't switch to dark either.