Flutter Screen Recording Dialog Press

六眼飞鱼酱① 提交于 2020-05-07 09:19:08

问题


How can I detect which button is pressed "start now" or "cancel" to change some design by pressing them. The dialog open by this line of code,

FlutterScreenRecording.startRecordScreen("file.mp4");


回答1:


Have some boolen variable in your state. and on click of start now call setState function as below :

setState(() {
   startRecording = true;
})

where you want to show changes check whether it has become true or not. On true do the changes otherwise nothing will happen.



来源:https://stackoverflow.com/questions/61338060/flutter-screen-recording-dialog-press

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!