Flutter mobile - certificate and SSL exclusions for development domains
Flutter mobile development gets twisty when working behind corporate firewalls and with self-signed development certificates. We look at a bit of code that can be used in debug builds that sets the emulator/simulator proxies and disables cert checks. Example Code See fs-dart-tools on GitHub for the latest versions of this code. You can use this sample code wrapped in an `if (isKDebug)` when running Flutter on mobile. It lets you exclude your self-signed certificates for your internal domains while leaving certificate checks enabled for production and external domains. The code also sets the proxy when running in the Android Emulator or the iOS Simulator. Setting the proxy is optional, enabled when you pass in the proxy port. import 'dart:io' ; /// /// Ignores certificates in developermode for limited set of domains /// Simplifies development in corporate self signed environment /// Configures the emulator or simulator proxy if passed pr...