我在 Flutter 中有以下 IconButton ,当它onPressed
触发音频播放器播放时;
IconButton(
key: const Key('play_button'),
onPressed: _play,
iconSize: 30,
icon: Icon(PlayerButtons.playbuttonbig),
),
但是,当我这样做时,为什么它会无法播放?
IconButton(
key: const Key('play_button'),
onPressed:(){
_play;
},
iconSize: 30,
icon: Icon(PlayerButtons.playbuttonbig),
),
我需要使用第二个的原因是因为我想在“_play”之前或之后调用另一个函数