简体   繁体   中英

How to get listen flutter widget rendering updates /change?

I want to experiment with making videos with flutter, I already have an idea, namely by making the widget an image, but I'm confused when there is a controller / setState update, how do i listen for updates of all widget changes?

you can simply set a breakpoint inside the build() method of your widget, or you can simply set a print() :

/*...*/
@override
Widget build(BuildContext context) {
 print("build");
/*...*/ 
 }

whenever a rebuild will be done to your widget, the build() will be called, and so the print() will be called

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM