CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate using an letsencrypt-signed webserver | flutter

I have spent so many hours just to figure this out. I use wss(secure) for my django websocket. Ive realized that using firebase and firecamp is working perfectly, but in my flutter app websocket connect it does not work. arggg, spending many hours working this error (I initially dont know why the heck is this).

Adding this piece of code in the main.dart file fix my issue. :)