Flutter/Dart - 为什么我的 iconButton 上的 onPressed 会起作用

Flutter/Dart - Why would onPressed on my iconButton work

我在 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”之前或之后调用另一个函数

IconButton(
          key: const Key('play_button'),
          onPressed:(){
            _play(); //<- call the play function like this
          }, 
          iconSize: 30,
          icon: Icon(PlayerButtons.playbuttonbig),
        ),
IconButton(
      key: const Key('play_button'),
      onPressed:(){
        _play();
      },
      iconSize: 30,
      icon: Icon(PlayerButtons.playbuttonbig),
    ),

如果 _play() 是一个应该可以工作的函数