parseToList method
Implementation
@override
Future<List<String>> parseToList(String path, {String? packageName}) async {
if (packageName != null) {
path = '$packageName/$path';
}
final certificatesString = await rootBundle.loadString(path);
final List<String> certificatesList = certificatesString
.split('-----END CERTIFICATE-----')
.where((cert) => cert.contains('-----BEGIN CERTIFICATE-----'))
.map((cert) => '${cert.trim()}\r\n-----END CERTIFICATE-----')
.toList();
return certificatesList;
}