Can't get button press to work in flutter

后端 未结 4 1012
再見小時候
再見小時候 2021-01-18 06:54

Ok I\'m pretty new to flutter/ dart so go easy on me. I\'m just trying to make a very simple app where when you press a button some text updates telling you how many times

4条回答
  •  深忆病人
    2021-01-18 07:22

    Your button should be like this.:

    new RaisedButton( 
        child: const Text('Press meh'), 
        onPressed: _buttonWasPressed, 
    ),
    

    If this doesn't work, then try to clean your flutter project with flutter clean and then reinstalling the app on debug device.

提交回复
热议问题