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

Make the text editor theme respect the user's theme on first time #19

Open
qrhfz opened this issue Dec 12, 2022 · 3 comments
Open

Make the text editor theme respect the user's theme on first time #19

qrhfz opened this issue Dec 12, 2022 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@qrhfz
Copy link

qrhfz commented Dec 12, 2022

image

@qrhfz
Copy link
Author

qrhfz commented Dec 12, 2022

Oh, user needs to change Text Editor Theme also.

@gumbarros
Copy link
Owner

Thanks for the issue! I will develop the following solution: When the user open the app on the first time, I will default the text editor theme to the user theme, but after that, the user can override both app and editor theme.

@gumbarros gumbarros added help wanted Extra attention is needed enhancement New feature or request and removed enhancement New feature or request labels Dec 12, 2022
@gumbarros
Copy link
Owner

gumbarros commented Dec 12, 2022

I'm sorry @qrhfz, I will leave this issue open because I have an impediment. As a workaround, you can just set your text editor theme at settings.

To get the user theme settingsProvider would need BuildContext.
image
To use the context here:

      textEditorTheme: _settingsBox.get("textEditorTheme",
          defaultValue: Theme.of(context).brightness == Brightness.dark
              ? "vs2015"
              : "vs"),

If anyone with Riverpod knowledge knows how to access the BuildContext inside a Provider, I will be grateful.
I will just set the default theme to vs2015, because the majority of developers use dark theme.

@gumbarros gumbarros changed the title Text Field is white with white background when dark mode is active Make the text editor theme respect the user's theme on first time Dec 12, 2022
gumbarros added a commit that referenced this issue Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants