有人知道当按下按钮时如何改变Flutter 时的文字样式吗?
例如,我有这样一个代码:
class _scanningState extends State<scan> {
String strText = 'ABCDEFG';
@override
Widget build(BuildContext context) {
return Scaffold(backgroundColor: Colors.blue,
body: new Column(
children: <Widget>[
new Text(strText),
new RaisedButton(
child: new Text('Button'),
onPressed: (){
//Change text style of strText()???
},
)
],
)
);
}