when I'm entering the correct email and password but I'm getting "Something went wrong..." Error snack bar. I want to display logged in successfully. postman request is working properly. struggling to find the error. how to resolve this. I attached full login.dart code for your reference. appreciate your help on this.
Future LoginData() async {
    setState(() {
      isLoading = true;
      typing = false;
    });
    try {
      var response = await Dio().post(BASE_API + 'user/login',
          data: {"email": email, "password": password});
      if (response.data["message"] == "logged in successfully") {
          setState(() {
            isLoading = false;
          });
        Get.snackbar("success", "logged in successfully");
          Get.to(BottomNavigation());
      }
   
     else {
        setState(() {
          isLoading = false;
          typing = true;
        });
        Get.snackbar(
          "error",
          "No User Found",
          // backgroundColor: heartRed.withOpacity(0.8),
          // colorText: textWhite,
        );
      }
      print("res: $response");
      setState(() {
        isLoading = false;
        typing = true;
      });
    } catch (e) {
      setState(() {
        isLoading = false;
        typing = true;
      });
      Get.snackbar("Error", "Something went wrong.Please contact admin",
          backgroundColor: buttontext .withOpacity(0.5),
          borderWidth: 1,
          borderColor: Colors.grey,
          colorText: Colors.white,
          icon: Icon(
            Icons.error_outline_outlined,
            color: Colors.red,
            size: 30,
          ));
      print(e);
    }
  }
 isLoading
              ? SpinKitDualRing(
                  color: textWhite,
                  size: 40,
                )
              : GestureDetector(
                  child: MainButton("Login"),
                  onTap: () async {
                    FocusManager.instance.primaryFocus?.unfocus();
                    if (_formKey.currentState!.validate()) {
                      _formKey.currentState!.save();
                       await LoginData();
                     // Get.to(BottomNavigation());
                    }
                  },
                ),



datatojson.encode({'email':...})to convert it before passing to dio.