小编ale*_*qri的帖子

在 Text widget flutter 中打印 int 值

我们如何在 Text 小部件中打印 int 值?我尝试使用“$num”,但它只是作为 num 的实例出现。

这是我到目前为止尝试过的

Text(
   '$widget.count'+'. ',
    style: TextStyle(
    fontFamily: 'sansPro',
    fontSize: 15,
    color: Colors.black,
    fontWeight: FontWeight.bold,
      ),
    ),
Run Code Online (Sandbox Code Playgroud)

dart android-studio flutter

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

android-studio ×1

dart ×1

flutter ×1