Sub6Resources / flutter_html

A Flutter widget for rendering static html as Flutter widgets (Will render over 80 different html tags!)
https://pub.dev/packages/flutter_html
MIT License
1.8k stars 874 forks source link

[QUESTION] Scale font size #1157

Closed Almis90 closed 1 year ago

Almis90 commented 2 years ago

Hello, how I can increase font scaling for all texts using the 3.0.0-alpha.6 version? I have created a custom tagMatcher, it increases the size but the final result is not as good as without a custom renderer (except for font size). Also I don't want to set TextStyle manually, maybe there is an option to map Style to TextStyle?

EDIT: found mapper from Style To TextStyle but still don't know how to setup global font size scale

              widget: (context, buildChildren) {
                return Text(
                  context.tree.element?.text ?? '',
                  style: TextStyle(
                    fontSize: context.style.fontSize!.value * 1.2,
                    color: context.style.color
                  ),
                );
              },

A picture of a cute animal (not mandatory but encouraged)

rizkiiansyah commented 1 year ago

Up

cogivn commented 1 year ago

Up

esuljic commented 1 year ago

Up

Sub6Resources commented 1 year ago

Merging into #1211