-
-
Notifications
You must be signed in to change notification settings - Fork 876
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
how to use customtextstyle to change the font size and line height? #116
Comments
You can use the |
@The-Redhat Thanks for your reply, the code says
Below is my code:-
|
You need to import dom:
|
@The-Redhat Thanks you so much.. the Code works..but the custom styles do not get seen ... basically, there is no change on the text even after implementing custom styles |
The code you posted doesn't really change the TextStyle, or am I wrong ? |
@The-Redhat I tried changing the line height using textstyle=TextStyle(height: 1); in the code.. |
But isn't 1 the default ? |
@The-Redhat yes... even if i change it to 2 or 2.5 ... No effect is shown... |
Ah okay does it work with other elements ? |
@The-Redhat nope... I tried using with p tag also... It does not...even the font size does not change |
Ok .. I haven't used the customTextStyle, the owner of this package for help should be able to help you |
@Sub6Resources pls help |
One question: to what is useRichText set ? If set to false try set it to true. |
@The-Redhat no use... nothing changes |
@Sub6Resources pls help |
@ADLsourceCode please post your current code so we can take a look and see if there's anything not quite right. |
Here is the correct way to use customTextStyle: (dom.Node node, TextStyle baseStyle) {
if (node is dom.Element) {
switch (node.localName) {
case "article":
return baseStyle.merge(TextStyle(height: 2, fontSize: 32));
}
}
}, Note that |
@Sub6Resources Below is my code :-
|
Hmm, this is odd. I'm able to replicate the issue, so I'll look into it. |
I've identified the issue. A fix will be released asap. |
A fix has been released in Version 0.10.4. The README now also contains example code for using |
@Sub6Resources It works... Thank you so much for your support. @The-Redhat Thanks to you too. |
Hello,
How do I use customTextstyle to change the line height and font size of the text?
Below is my code:-
The text was updated successfully, but these errors were encountered: