encryptData function

Future<String> encryptData(
  1. dynamic value
)

Implementation

Future<String> encryptData(value)async{
  const String api = "/encrypt_data";
  String result = "";
  try {
    final response = await dio.post(api, data: value);
    if (response.statusCode == 200) {
      result = response.data.toString();
      await showMsgSuccess("Mobile Money", "Encryption successfully done");
    }
  } catch (e) {
    print(e.toString());
    showMsgFailed("Mobile Money", "Failed to Encrypt your data");
  }
  return result;
}