Flutter 如何实现垂直方向的文本?
我想用TextDirection从上到下实现一个文本,但是TextDirection只有两个选项Flutter 如何实现垂直方向的文本?,flutter,Flutter,我想用TextDirection从上到下实现一个文本,但是TextDirection只有两个选项 enum TextDirection { /// The text flows from right to left (e.g. Arabic, Hebrew). rtl, /// The text flows from left to right (e.g., English, French). ltr, } 你可以用 两种方法都可以 Center( child
enum TextDirection {
/// The text flows from right to left (e.g. Arabic, Hebrew).
rtl,
/// The text flows from left to right (e.g., English, French).
ltr,
}
你可以用
两种方法都可以
Center(
child: Column(mainAxisSize: MainAxisSize.min, children: [
RotatedBox(
child: Text("rotated"),
quarterTurns: 3,
),
Divider(),
Column(
children: "stacked".split('').map((c) => Text(c)).toList(),
)
]),
)
一个是旋转文本。另一种是在列中堆叠字符
Center(
child: Column(mainAxisSize: MainAxisSize.min, children: [
RotatedBox(
child: Text("rotated"),
quarterTurns: 3,
),
Divider(),
Column(
children: "stacked".split('').map((c) => Text(c)).toList(),
)
]),
)