Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inspect element support on flutter web apps

I have been trying to integrate a web based product tour/on-boarding plugin which will help a new user to understand the application without any external intervention. I cam across this plugin : https://getuserflow.com/ which works well with html websites, I tried integrating this with flutter web app and it fails to detect any element as flutter doesnt support inspect using chrome for some reason.

Whenever I try to inspect a flutter web app it shows this: Inspect on flutter web app

It is almost impossible to inspect individual elements same as we can do on other web apps developed in angular or php.

Is there a way on flutter web to enable web inspect so that the plugin will be supported?

like image 472
crimson suv Avatar asked May 30 '26 12:05

crimson suv


2 Answers

To make Flutter generate the full HTML tree and thus accessibility tree, you have to add SemanticsBinding.instance.ensureSemantics(); after runApp(const MyApp()); I have also seen RendererBinding.instance.ensureSemantics() but not sure what the difference is...

like image 135
hannahiss Avatar answered Jun 02 '26 03:06

hannahiss


Inspect element works with HTML and CSS files. And flutter converts your dart code to canvas, that's why we can't do inspect element.

And I don't think it is possible as of version 2.

like image 21
Mihir khambhati Avatar answered Jun 02 '26 02:06

Mihir khambhati