颤振屏幕录制对话框按 [英] Flutter Screen Recording Dialog Press

查看:100
本文介绍了颤振屏幕录制对话框按的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何检测按下立即开始"或取消"按钮以更改某些设计的按钮.通过此行代码打开对话框,

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");

推荐答案

您的状态中有一些布尔变量.然后单击开始",立即调用setState函数,如下所示:

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

setState(() {
   startRecording = true;
})

要显示更改的地方,请检查更改是否为true.确实要进行更改,否则将不会发生任何事情.

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

这篇关于颤振屏幕录制对话框按的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆