The method 'registerMessageHandler' isn't defined for the type 'Registrar' The method 'registerMessageHandler' isn't defined for the type 'Registrar' flutter flutter

The method 'registerMessageHandler' isn't defined for the type 'Registrar'


my error gone with flutter clean once and it will work fine for me


flutter clean didn't work for me. My problem was that I made the project in the Flutter beta channel and then opened in the stable channel. When I switched back to beta it was OK. Once web support enters stable this shouldn't be a problem anymore.


I faced the same issue when I downgraded Flutter from 2.0.0+ to 1.22.6. Developed the web panel in 2.0.0+ but after downgrading it for another app, saw this.

The error is likely if you created the project in stable version and for some reason you downgraded to a lower Flutter version.

FIX: Upgrade to the higher / updated version OR check the channel it was built on and shift to that channel.

You can see which channel you are currently on with flutter channel in your cmd.