📜  如何在 Flutter 中设置文本按钮的样式 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:08.249000             🧑  作者: Mango

代码示例2
TextButton(
    child: Text('Text'),
    style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Colors.red)),
    onPressed: () {
         // action on pressed
    },
),