有没有办法在 Flutter 中以小写字母显示文本?

Thé*_*gel 8 dart flutter

我正在寻找一种以小型大写字母显示 Google 字体的方法。

我正在使用google_fonts包。

小智 9

您可以像这样使用FontFeaturea 中的属性TextStyle

import "dart:ui";

Text('This is a Google Font',
      style: GoogleFonts.lato(
        textStyle: TextStyle(fontFeatures:[FontFeature.enable('smcp')], color: Colors.blue, letterSpacing: .5), 
        //smcp as in small caps
      ),
    ),
Run Code Online (Sandbox Code Playgroud)