How to use PingFangSC? Is PingFangSC included by default in Flutter?

Viewed 1149

Now I have a design drawing, the title of which is PingFangSC-Semibold, and the content is PingFangSC-Regular.

How to use PingFangSC-Regular and PingFangSC-Semibold in Flutter?

The default font in Flutter seems to be SF. Do I need to introduce these two fonts, or how?

enter image description here

1 Answers

For us custom font you can use this pages:

1.flutter

2.StackOverflow

But for this font no need to added the TTF file. just call it like this :

 Text(
              '取消',
              style: TextStyle(
                  fontSize: 28,
                  fontWeight: FontWeight.w400,
                  fontFamily: 'PingFangSC-Regular,PingFang SC'),
            ),
Related