CERTIFICATE_VERIFY_FAILED error while performing a POST request in Flutter
Sometimes Flutter/Dart shows random CERTIFICATE_VERIFY_FAILED error. Mostly it happens when try to request POST or fetch images. Below are simple steps to avoid this error.
In your main.dart file, add or import the following class:
In your main function, add the following line after function definition: