问题
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