How to estabilish a secure connection on localhost with angular dart webdev?


I’m using angular dart to build a web application, and when it comes to accessing user location feature such as geolocation, browsers like chrome enforce https.
When I deploy the web application the location api works because the connection is secure, but when I debug on localhost it is broken because (I assume) of the unsecure session.

Is there a way to configure the webdev generated http server to use somehow a self signed ssl certificate?

Is there any viable alternative?


Yes, --tls-cert-chain and --tls-cert-key flags were just added to webdev serve. I used this tutorial for setting up the cert and key:

Then the following command served up the app at

webdev serve --release --tls-cert-chain path-to-cert/server.crt --tls-cert-key path-to-key/server.key

The changes are in webdev 2.5.0.

Answered By – rkunboxed

Answer Checked By – Marie Seifert (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *