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

[VxTextBuilder] Add VxTextTheme to change DefaultTextStyle of the text at theme level. #60

Open
AyushBherwani1998 opened this issue Jan 11, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@AyushBherwani1998
Copy link
Contributor

AyushBherwani1998 commented Jan 11, 2021

Is your feature request related to a problem? Please describe.
By default, VxTextBuilder uses default text style, and there's no way to change the default texts style on theme level. Normally, we could have wrap MaterialApp with DefaultTextStyle but there's already an open issue that Text doesn't inherit DefaultTextStyle beyond Scaffold. It's been 2 years to the issue, and it's really inconvenient to change the DefaultTextStyle for every page.

Describe the solution you'd like
The idea is to bring VxTextTheme which can be wrapped around MaterialApp to change the default text style through out the application. VxTextBuilder will give to priority to VxTextTheme if any or it will fall back to default.

@iampawan iampawan added the enhancement New feature or request label Jan 21, 2021
@M-A-D-A-R-A
Copy link

i would like to work on this issue can you guide me though it @AyushBherwani1998 plz!! Thanks

@AyushBherwani1998
Copy link
Contributor Author

@M-A-D-A-R-A the main issue here is how to access the TextStyle from parent. For an instance, we can introduce a VxTheme to define TextStyle but the main issue is how to access that VxTheme without context. Currently to build a text, we use this syntax "String".text.make(). For that TextStyle to be default we might have to change the syntax to "String".text(context).make(). We can also introduce a new extension of vXTextTheme to get the default TextStyle i.e. "String".text.vXTextTheme(context).make()

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

3 participants