Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Dark Theme #12

Closed
the-thirteenth-fox opened this issue Apr 22, 2020 · 6 comments
Closed

Support for Dark Theme #12

the-thirteenth-fox opened this issue Apr 22, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@the-thirteenth-fox
Copy link

Screenshot_20200422-094530
Screenshot_20200422-094517

@asjqkkkk
Copy link
Owner

It's a good idea to support a default dark theme for markdown_widget, but I need to take the time to think about how to better implement this function.
Before that, you can use PreConfig to customize the dark theme for your application

      styleConfig: StyleConfig(
        preConfig: PreConfig(
          decoration: BoxDecoration(
            color: codeBgColor,
            borderRadius: BorderRadius.all(
              Radius.circular(10),
            ),
          ),
          theme: isDark ? theme.darkTheme : theme.arduinoLightTheme,
        ),
      ),

@asjqkkkk asjqkkkk added the enhancement New feature or request label Apr 22, 2020
@asjqkkkk
Copy link
Owner

now you can update to v1.1.2 to use dark theme😄

  Widget buildMarkdown() => MarkdownWidget(
        data: data,
        controller: controller,
        styleConfig: StyleConfig(
          markdownTheme: MarkdownTheme.lightTheme
        ),
      );

@asjqkkkk
Copy link
Owner

it should be MarkdownTheme.darkTheme 😂

@the-thirteenth-fox
Copy link
Author

Cool! But, i think that the small distance between the some elements and the wrong angles of code blocs.
Screenshot_20200422-190151
Screenshot_20200422-190209
Screenshot_20200422-1901511

@asjqkkkk
Copy link
Owner

Cool! But, i think that the small distance between the some elements and the wrong angles of code blocs.
Screenshot_20200422-190151
Screenshot_20200422-190209
Screenshot_20200422-1901511

maybe it's flutter's issue, you could have a try for Online Demo with dark mode

@the-thirteenth-fox
Copy link
Author

I solved it!
Сhanged it
childMargin: EdgeInsets.only(left: 10, right: 10),
to this
childMargin: EdgeInsets.all(10),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants