ensureIsrgCertificate static method
Ensures the ISRG Root X1 certificate is trusted on the device.
Implementation
static Future<void> ensureIsrgCertificate() async {
final ByteData data = await rootBundle.load('assets/isrgrootx1.pem');
SecurityContext.defaultContext.setTrustedCertificatesBytes(
data.buffer.asUint8List(),
);
}